Sail E0 Webinar

MCQs

Total Questions : 121 | Page 2 of 13 pages
Question 11. What will be the output of the following PHP code ?$color = "red";$color = "green";echo "$color";
  1.    red green
  2.    error
  3.    red
  4.    green
 Discuss Question
Answer: Option D. -> green
Question 12. What will be the output of the following PHP code ?$color1 = "1";$color2 = "1";echo "$color1" + "$color2";
  1.    0
  2.    2
  3.    11
  4.    1
 Discuss Question
Answer: Option B. -> 2
Question 13. What will be the output of the following PHP code ?$color1 = "red";$color2 = "red";echo "$color1" + "$color2";
  1.    red green
  2.    1
  3.    redgreen
  4.    0
 Discuss Question
Answer: Option D. -> 0
Question 14. What will be the output of the following PHP code ?$color1 = "red";$color2 = "green";echo "$color1" . "$color2";
  1.    red
  2.    redgreen
  3.    red green
  4.    green
 Discuss Question
Answer: Option B. -> redgreen
Question 15. What will be the output of the following PHP code ?$color1 = "red";$color2 = "1";echo "$color1" + "$color2";
  1.    0
  2.    red 1
  3.    red1
  4.    1
 Discuss Question
Answer: Option D. -> 1
Question 16. What will be the output of the following PHP code ?echo "This", "was", "a", "bad", "idea";
  1.    This was a bad idea
  2.    This, was, a, bad, idea
  3.    Error
  4.    Thiswasabadidea
 Discuss Question
Answer: Option D. -> Thiswasabadidea
Question 17. What will be the output of the following PHP code ?$color1 = "red";$color2 = "1";$color3 = "grey";echo "$color1" + "$color2" . "$color3";
  1.    1grey
  2.    grey
  3.    red1grey
  4.    0
 Discuss Question
Answer: Option A. -> 1grey
Question 18. What will be the output of the following PHP code ?$one = "Hello";$two = "World";echo $one, $two;
  1.    Hello World
  2.    World
  3.    HelloWorld
  4.    Hello
 Discuss Question
Answer: Option C. -> HelloWorld
Question 19. What will be the output of the following PHP code ?echo "This"."was"."a"."bad"."idea";
  1.    Thiswasabadidea
  2.    Error
  3.    This, was, a, bad, idea
  4.    This was a bad idea
 Discuss Question
Answer: Option A. -> Thiswasabadidea
Question 20. What will be the output of the following PHP code ?$one = "Hello";$two = "World";echo "$one$two";
  1.    Error
  2.    $one$two
  3.    Hello
  4.    HelloWorld
 Discuss Question
Answer: Option D. -> HelloWorld

Latest Videos

Latest Test Papers