Sail E0 Webinar

MCQs

Total Questions : 53 | Page 2 of 6 pages
Question 11. What will be the output of the following PHP code?
  1.    I like Volvo, Toyota and BMW
  2.    I like Volvo, BMW and Toyota
  3.    I like BMW, Volvo and Toyota
  4.    I like Toyota, BMW and Volvo
 Discuss Question
Answer: Option D. -> I like Toyota, BMW and Volvo
Question 12. What will be the output of the following PHP code?
  1.    Array ( Peter Ben Joe )
  2.    Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
  3.    Array ( 35 37 43 )
  4.    Array ( [35] => Peter [37] => Ben [43] => Joe )
 Discuss Question
Answer: Option D. -> Array ( [35] => Peter [37] => Ben [43] => Joe )
Question 13. What will be the output of the following PHP code?
  1.    Array ( [A] => 5 [Cat] => 2 [Dog] => 2 [Tiger] => 1 )
  2.    Array ( [A] => 2 [Cat] => 2 [Dog] => 1 [Tiger] => 1 )
  3.    Array ( [A] => 6 [Cat] => 1 [Dog] => 2 [Tiger] => 1 )
  4.    Array ( [A] => 2 [Cat] => 1 [Dog] => 4 [Tiger] => 1 )
 Discuss Question
Answer: Option A. -> Array ( [A] => 5 [Cat] => 2 [Dog] => 2 [Tiger] => 1 )
Question 14. What will be the output of the following PHP code?
  1.    Array ( [d] => yellow )
  2.    Array ( [i] => orange )
  3.    Array ( [h] => orange )
  4.    Array ( [d] => yellow [h] => orange )
 Discuss Question
Answer: Option A. -> Array ( [d] => yellow )
Question 15. What will be the output of the following PHP code?
  1.    Array ( [a] => blue [b] => yellow [c] => red [d] => green )
  2.    Array ( [0] => blue [1] => yellow [2] => red [3] => green )
  3.    Array ( [0] => red [1] => green [2] => blue [3] => yellow )
  4.    Array ( [a] => red [b] => green [c] => blue [d] => yellow )
 Discuss Question
Answer: Option D. -> Array ( [a] => red [b] => green [c] => blue [d] => yellow )
Question 16. What will be the output of the following PHP code?
  1.    Sam is the brother of Bob and Jack
  2.    Sam is the brother of Bob and Bob)
  3.    Sam is the brother of Jack and Bob)
  4.    Error
 Discuss Question
Answer: Option B. -> Sam is the brother of Bob and Bob)
Question 17. What will be the output of the following PHP code?
  1.    Array ( [0] => LA [1] => Paris [2] => Paris )
  2.    Array ( [0] => NYC [1] => LA [2] => Paris)
  3.    Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris )
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> Array ( [0] => LA [1] => Paris [2] => Paris )
Question 18. What will be the output of the following PHP code?
  1.    Sam is the brother of Bob and Bob) $brother
  2.    Sam is the brother of Bob and Bob)
  3.    $brother
  4.    Error
 Discuss Question
Answer: Option D. -> Error
Question 19. What will be the output of the following PHP code ?
  1.    Array ( [Harry] => 21 [Ron] => 23 [Malfoy] => 21 )
  2.    Array ( [HARRY] => 21 [RON] => 23 [MALFOY] => 21 )
  3.    Array ( [HARRY] => 21 [RON] => 23 )
  4.    Array ( [Harry] => 21 [Ron] => 23 )
 Discuss Question
Answer: Option C. -> Array ( [HARRY] => 21 [RON] => 23 )
Question 20. What will be the output of the following PHP code ?
  1.    Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow )
  2.    Array ( [a] => a [b] => b [c] => c [d] => d )
  3.    Array ( [red] => a [green] => b [blue] => c [yellow] => d )
  4.    Array ( [a] => red [b] => green [c] => blue [d] => yellow )
 Discuss Question
Answer: Option C. -> Array ( [red] => a [green] => b [blue] => c [yellow] => d )

Latest Videos

Latest Test Papers