Tamil Nadu Board of Secondary EducationHSC Science Class 12th

What will be displayed in a browser when the following PHP code is executed: <?php for (Scounter = 20; $counter< 10; $counter++) { echo “Welcome to Tamilnadu “; } echo “Counter is: Scounter”; ?> - Computer Applications

Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads
MCQ

What will be displayed in a browser when the following PHP code is executed:

<?php
for (Scounter = 20; $counter< 10;
$counter++)
{
echo “Welcome to Tamilnadu “;
}
echo “Counter is: Scounter”;
?>

Options

  • Welcome to Tamilnadu

  • Counter is: 20

  • Welcome to Tamilnadu Counter is: 22

  • Welcome to Tamilnadu Welcome to Tamilnadu Counter is: 22

Advertisement Remove all ads

Solution

Counter is: 20

Concept: Looping Structure
  Is there an error in this question or solution?

APPEARS IN

Tamil Nadu Board Samacheer Kalvi Class 12th Computer Application Answers Guide
Chapter 7 Looping Structure
Evaluation - PART – I | Q 5. | Page 117
Share
Notifications

View all notifications


      Forgot password?
View in app×