Sail E0 Webinar

MCQs

Total Questions : 74 | Page 2 of 8 pages
Question 11. What will be the output of the following PHP code ?if (-100)print "hi";elseprint "how are u";
  1.    hi
  2.    no output
  3.    error
  4.    how are u
 Discuss Question
Answer: Option A. -> hi
Question 12. What will be the output of the following PHP code ?$x = 10;$y = 20;if ($x > $y && 1||1)print "hi";elseprint "how are u";
  1.    error
  2.    hi
  3.    no output
  4.    how are u
 Discuss Question
Answer: Option B. -> hi
Question 13. What will be the output of the following PHP code ?$x = 10;$y = 20;if ($x > $y + $y != 3)print "hi";elseprint "how are u";
  1.    how are u
  2.    hi
  3.    error
  4.    no output
 Discuss Question
Answer: Option B. -> hi
Question 14. What will be the output of the following PHP code ?$a = "a";if ($a)print "all";elseprint "some";
  1.    some
  2.    no output
  3.    all
  4.    error
 Discuss Question
Answer: Option C. -> all
Question 15. What will be the output of the following PHP code ?if (0.1)print "hi";elseprint "how are u";
  1.    no output
  2.    hi
  3.    error
  4.    how are u
 Discuss Question
Answer: Option B. -> hi
Question 16. What will be the output of the following PHP code ?if (0.0)print "hi";elseprint "how are u";
  1.    error
  2.    how are u
  3.    no output
  4.    hi
 Discuss Question
Answer: Option B. -> how are u
Question 17. What will be the output of the following PHP code ?$x = 1;if ($x = $x& 0)print $x;elsebreak;
  1.    error
  2.    1
  3.    no output
  4.    0
 Discuss Question
Answer: Option A. -> error
Question 18. What will be the output of the following PHP code ?$x = 1;if ($x = $x& 0)print $x;elseprint "how are u";
  1.    how are u
  2.    error
  3.    1
  4.    0
 Discuss Question
Answer: Option A. -> how are u
Question 19. What will be the output of the following PHP code ?if (print "0")print "hi";elseprint "how are u";
  1.    how are u
  2.    0hi
  3.    0how are u
  4.    hi
 Discuss Question
Answer: Option B. -> 0hi
Question 20. What will be the output of the following PHP code ?$x = 1;if ($x == 2)print "hi";else if($x = 2)print $x;elseprint "how are u";
  1.    how are u
  2.    hi
  3.    2
  4.    error
 Discuss Question
Answer: Option C. -> 2

Latest Videos

Latest Test Papers