Sail E0 Webinar

MCQs

Total Questions : 74 | Page 8 of 8 pages
Question 71. What will be the output of the following PHP code ?$a = array("hi", "hello", "bye");for (;count($a) < 5;) {if (count($a) == 3)print $a;}
  1.    (“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)(“hi”,”hello”,”bye”)…infinitely
  2.    ArrayArrayArrayArrayArrayArray….infinitely
  3.    hihellobyehihellobyehihellobyehihellobyehihellobyehihellobye…..infinitely
  4.    no output
 Discuss Question
Answer: Option B. -> ArrayArrayArrayArrayArrayArray….infinitely
Question 72. What will be the output of the following PHP code ?for ($i = 0; $i % ++$i; $i++) {print"i";}
  1.    error
  2.    no output
  3.    infinite loop
  4.    0
 Discuss Question
Answer: Option C. -> infinite loop
Question 73. What will be the output of the following PHP code ?for ($i = 0; $i < 5; $i++) {for(; $i < 5; $i++)print"i";}
  1.    iiiii
  2.    no output
  3.    infinite loop
  4.    iiiiiiiiiiiiiiiiiiiiiiiii
 Discuss Question
Answer: Option A. -> iiiii
Question 74. What will be the output of the following PHP code ?$a = array("hi", "hello", "bye");foreach ($a as $value) {if (count($a) == 2)print $value;}
  1.    infinite loop
  2.    hihello
  3.    hihellobye
  4.    no output
 Discuss Question
Answer: Option D. -> no output

Latest Videos

Latest Test Papers