Sail E0 Webinar

MCQs

Total Questions : 121 | Page 9 of 13 pages
Question 81. What will be the output of the following PHP code ?$auth = 1;$status = 1;if ($result = (($auth == 1) && ($status != 0))) {print "result is $result";}
  1.    result is 1
  2.    error
  3.    no output
  4.    result is true
 Discuss Question
Answer: Option A. -> result is 1
Question 82. What will be the output of the following PHP code ?$i = 5;while (--$i > 0 && ++$i) {print $i;}
  1.    error
  2.    555555555…infinitely
  3.    5
  4.    54321
 Discuss Question
Answer: Option B. -> 555555555…infinitely
Question 83. What will be the output of the following PHP code ?$i = 5;while (--$i > 0) {$i++;print $i;print "hello";}
  1.    5hello5hello5hello5hello5hello…..infinite
  2.    error
  3.    4hello4hello4hello4hello4hello…..infinite
  4.    no output
 Discuss Question
Answer: Option C. -> 4hello4hello4hello4hello4hello…..infinite
Question 84. What will be the output of the following PHP code ?$i = "";while ($i = 10) {print "hi";}print "hello";
  1.    hello
  2.    infinite loop
  3.    error
  4.    hihello
 Discuss Question
Answer: Option B. -> infinite loop
Question 85. What will be the output of the following PHP code ?$i = 0;while ($i = 10) {print "hi";}print "hello";
  1.    hello
  2.    infinite loop
  3.    error
  4.    hihello
 Discuss Question
Answer: Option B. -> infinite loop
Question 86. What will be the output of the following PHP code ?$i = 0;$j = 0;if ($i && ($j = $i + 10)) {echo "true";}echo $j;
  1.    10
  2.    0
  3.    true10
  4.    true0
 Discuss Question
Answer: Option B. -> 0
Question 87. What will be the output of the following PHP code ?$i = 2;while (++$i) {while ($i --> 0)print $i;}
  1.    no output
  2.    210
  3.    10
  4.    infinite loop
 Discuss Question
Answer: Option B. -> 210
Question 88. What will be the output of the following PHP code ?$i = 0;while (++$i && --$i) {print $i;}
  1.    no output
  2.    01234567891011121314…infinitely
  3.    1234567891011121314….infinitely
  4.    error
 Discuss Question
Answer: Option A. -> no output
Question 89. What will be the output of the following PHP code ?echo 5 * 9 / 3 + 9;
  1.    0
  2.    24
  3.    3.7
  4.    3.85
 Discuss Question
Answer: Option B. -> 24
Question 90. What will be the output of the following PHP code ?$i = 0;while ((--$i > ++$i) - 1) {print $i;}
  1.    00000000000000000000….infinitely
  2.    no output
  3.    error
  4.    -1-1-1-1-1-1-1-1-1-1…infinitely
 Discuss Question
Answer: Option A. -> 00000000000000000000….infinitely

Latest Videos

Latest Test Papers