Sail E0 Webinar

MCQs

Total Questions : 75 | Page 6 of 8 pages
Question 51. What will be the output of the following PHP code ?$var = 10;function one(){echo $var;}one();
  1.    None of the Mentioned
  2.    No Output
  3.    10
  4.    Error
 Discuss Question
Answer: Option B. -> No Output
Question 52. What will be the output of the following PHP code ?function 2myfunc(){echo "Hello World";}2myfunc();
  1.    None of the mentioned
  2.    ERROR
  3.    No Output
  4.    Hello World
 Discuss Question
Answer: Option B. -> ERROR
Question 53. What will be the output of the following PHP code ?function mine($m){if ($m < 0)echo "less than 0";if ($ >= 0)echo "Not True";}mine(0);
  1.    Not True
  2.    No Output
  3.    Less Than 0
  4.    None of the Mentioned
 Discuss Question
Answer: Option A. -> Not True
Question 54. What will be the output of the following PHP code ?function _func(){echo "Hello World";}_func();
  1.    No Output
  2.    ERROR
  3.    Hello World
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> Hello World
Question 55. What will be the output of the following PHP code ?$x = 75;$y = 25;function addition(){$GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];}addition();echo $z;
  1.    75
  2.    25
  3.    100
  4.    error
 Discuss Question
Answer: Option C. -> 100
Question 56. What will be the output of the following PHP code ?function time($string){echo strtr("Towe Pa55", "ow5", $string);}time("ims");
  1.    Time Pass
  2.    Towe Pass
  3.    Towe Pa55
  4.    Time Pa55
 Discuss Question
Answer: Option A. -> Time Pass
Question 57. What will be the output of the following PHP code ?function mine($num){$num = 2 + $num;echo $num;}mine(3);
  1.    None of the mentioned
  2.    $num
  3.    3
  4.    5
 Discuss Question
Answer: Option D. -> 5
Question 58. What will be the output of the following PHP code ?function test($int){if ($int == 1)echo "This Works";if ($int == 2)echo "This Too Seems To Work";}test(1);TEST(2);
  1.    This Works
  2.    This Too Seems To Work
  3.    ERROR
  4.    This WorksThis Too Seems To Work
 Discuss Question
Answer: Option D. -> This WorksThis Too Seems To Work
Question 59. What will be the output of the following PHP code ?function movie($int){$movies = array("Fight Club", "Kill Bill", "Pulp Fiction");echo "You Do Not Talk About ". $movie[$integer];}movie(0);
  1.    I
  2.    You Do Not Talk About Pulp Fiction
  3.    None of the mentioned
  4.    You Do Not Talk About Fight Club
 Discuss Question
Answer: Option A. -> I
Question 60. What will be the output of the following PHP code ?function addFunction($num1, $num2){$sum = $num1 + $num2;return $sum;}$return_value = addFunction(10, 20);echo "Returned value from the function : " .$return_value
  1.    Returned value from the function : 30
  2.    Returned value from the function : $return_value
  3.    Error
  4.    Returned value from the function :
 Discuss Question
Answer: Option A. -> Returned value from the function : 30

Latest Videos

Latest Test Papers