English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

What will be the output of the following PHP code? <?php for ($x = -1; $x < 10;--$x) { print $x; } ?> - Computer Applications

Advertisements
Advertisements

Question

What will be the output of the following PHP code?

<?php
for ($x = -1; $x < 10;--$x)
{
print $x;
}
?>

Options

  • 123456713910412

  • 123456713910

  • 1234567139104

  • Infinite loop

MCQ
Advertisements

Solution

Infinite loop

shaalaa.com
Looping Structure
  Is there an error in this question or solution?
Chapter 7: Looping Structure - Evaluation - PART – I [Page 117]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 12 TN Board
Chapter 7 Looping Structure
Evaluation - PART – I | Q 10. | Page 117
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×