Sail E0 Webinar

MCQs

Total Questions : 121 | Page 6 of 13 pages
Question 51. What will be the output of the following PHP code ?$hello = "Hello World";$bye = "Bye";echo $hello;"$bye";
  1.    Hello worldBye
  2.    Error
  3.    Hello World
  4.    Bye
 Discuss Question
Answer: Option C. -> Hello World
Question 52. What will be the output of the following PHP code ?$x;echo "$x";
  1.    Nothing
  2.    0
  3.    1
  4.    Error
 Discuss Question
Answer: Option A. -> Nothing
Question 53. What will be the output of the following PHP code ?$x = 5;function fun(){echo "$x";}fun();
  1.    Nothing
  2.    5
  3.    0
  4.    Error
 Discuss Question
Answer: Option A. -> Nothing
Question 54. What will be the output of the following PHP code ?$x = 5;{$x = 10;echo "$x";}echo "$x";
  1.    error
  2.    510
  3.    1010
  4.    105
 Discuss Question
Answer: Option C. -> 1010
Question 55. What will be the output of the following PHP code ?$x = 5;{echo "$x";}
  1.    Error
  2.    5
  3.    0
  4.    Nothing
 Discuss Question
Answer: Option B. -> 5
Question 56. What will be the output of the following PHP code ?$x =4;$y = 3;function fun($x, $y) {$z = $x + $y / $y + $x;echo "$z";}echo $x;echo $y;echo $z;fun(3, 4);
  1.    439
  2.    349
  3.    347
  4.    437
 Discuss Question
Answer: Option D. -> 437
Question 57. What will be the output of the following PHP code ?$x = 5;function fun(){$x = 10;echo "$x";}fun();echo "$x";
  1.    105
  2.    Error
  3.    0
  4.    510
 Discuss Question
Answer: Option A. -> 105
Question 58. What will be the output of the following PHP code ?$x = 3, 4, 5, 6;echo "$x";
  1.    6
  2.    Error
  3.    3
  4.    4
 Discuss Question
Answer: Option B. -> Error
Question 59. What will be the output of the following PHP code ?$x = 4;$y = 3;function fun($x = 3, $y = 4) {$z = $x+$y/$y+$x;echo "$z";}echo $x;echo $y;echo $z;fun($x, $y);
  1.    943
  2.    43
  3.    439
  4.    349
 Discuss Question
Answer: Option C. -> 439
Question 60. What will be the output of the following PHP code ?function fun($x,$y) {$x = 4;$y = 3;$z = $x + $y / $y + $x;echo "$z";}fun(3, 4);
  1.    0
  2.    Error
  3.    7
  4.    9
 Discuss Question
Answer: Option D. -> 9

Latest Videos

Latest Test Papers