πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$p = 5;
while($p = 20)
{   
    print "INDIA";
}
print "USA";
?>
  • (A) 5
  • (B) 20
  • (C) USA
  • (D) INDIA.....infinite time
πŸ’¬ Discuss
βœ… Correct Answer: (D) INDIA.....infinite time

Explanation: While condition always gives 1.

Explanation by: Jitendra Singh
While condition always gives 1.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
214
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Jitendra Singh
Publisher
πŸ“ˆ
94%
Success Rate