Sail E0 Webinar

MCQs

Total Questions : 75 | Page 3 of 8 pages
Question 21. What will be the output of the following PHP code?function a() {function b() {echo 'I am b';}echo 'I am a';}a();a();
  1.    Error
  2.    I am bI am a
  3.    I am b
  4.    I am a Error
 Discuss Question
Answer: Option D. -> I am a Error
Question 22. What will be the output of the following PHP code?function a() {function b() {echo 'I am b';}echo 'I am a';}b();a();
  1.    I am b
  2.    I am bI am a
  3.    Error
  4.    I am a Error
 Discuss Question
Answer: Option C. -> Error
Question 23. What will be the output of the following PHP code?$op2 = "blabla";function foo($op1) {echo $op1;echo $op2;}foo("hello");
  1.    helloblablablabla
  2.    hello
  3.    error
  4.    helloblabla
 Discuss Question
Answer: Option B. -> hello
Question 24. What will be the output of the following PHP code?echo(atan(0.50));
  1.    0.46364760900081
  2.    0.23568451142521
  3.    0.11845976421345
  4.    1
 Discuss Question
Answer: Option A. -> 0.46364760900081
Question 25. What will be the output of the following PHP code?define("GREETING","Hello you! How are you today?");echo constant("GREETING");
  1.    GREETING
  2.    GREETING, Hello you! How are you today?
  3.    “GREETING”,”Hello you! How are you today?”
  4.    Hello you! How are you today?
 Discuss Question
Answer: Option D. -> Hello you! How are you today?
Question 26. What will be the output of the following PHP code?function sum($num1, $num2) {$total = $num1 + $num2;echo "chr($total)";}$var1 = "sum";$var1(5, 44);
  1.    Error
  2.    49
  3.    Sum
  4.    1
 Discuss Question
Answer: Option D. -> 1
Question 27. 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 : $return_value
  2.    Returned value from the function :
  3.    Returned value from the function : 30
  4.    Error
 Discuss Question
Answer: Option C. -> Returned value from the function : 30
Question 28. What will be the output of the following PHP code?function sayHello() {echo "HelloWorld";}$function_holder = "sayHello";$function_holder();
  1.    Error
  2.    HelloWorld
  3.    No Output
  4.    sayHello
 Discuss Question
Answer: Option B. -> HelloWorld
Question 29. What will be the output of the following PHP code?function sum($num1, $num2) {$total = $num1 + $num2;echo "cos($total)";}sum(5,-5);
  1.    1
  2.    -0.5
  3.    0
  4.    0.5
 Discuss Question
Answer: Option A. -> 1
Question 30. What will be the output of the following PHP code?function b() {echo "b is executed";}function a(){b();echo "a is executed";b();}a();
  1.    b is executeda is executed
  2.    b is executedb is executedb is executed
  3.    a is executed
  4.    b is executeda is executedb is executed
 Discuss Question
Answer: Option D. -> b is executeda is executedb is executed

Latest Videos

Latest Test Papers