Sail E0 Webinar

MCQs

Total Questions : 53 | Page 3 of 6 pages
Question 21. What will be the output of the following PHP code ?
  1.    Array ( [a] => red [b] => green [c] => blue )
  2.    Array ( [a] => red [b] => green [c] => blue [d] => yellow )
  3.    Array ( [e] => red [f] => green [g] => blue )
  4.    Array ( [a] => red [b] => green [c] => blue [d] => yellow [e] => red [f] => green [g] => blue )
 Discuss Question
Answer: Option A. -> Array ( [a] => red [b] => green [c] => blue )
Question 22. What will be the output of the following PHP code ?
  1.    a
  2.    b
  3.    c
  4.    d
 Discuss Question
Answer: Option C. -> c
Question 23. What will be the output of the following PHP code ?
  1.    024
  2.    120
  3.    010
  4.    060
 Discuss Question
Answer: Option B. -> 120
Question 24. What will be the output of the following PHP code ?
  1.    Array ( [1] => Mumbai [0] => Beijing )
  2.    Array ( [0] => NYC [1] => London )
  3.    Array ( [1] => NYC [0] => London )
  4.    Array ( [0] => Mumbai [1] => Beijing )
 Discuss Question
Answer: Option D. -> Array ( [0] => Mumbai [1] => Beijing )
Question 25. What will be the output of the following PHP code ?
  1.    Lucy
  2.    Peter
  3.    Susan
  4.    Edmund
 Discuss Question
Answer: Option B. -> Peter
Question 26. What will be the output of the following PHP code ?
  1.    Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 )
  2.    Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 )
  3.    Array ( [0] => 5 [1] => 5 [2] => 5 [3] => 5 [4] => 5 [5] => 5 )
  4.    Array ( [0] => 0 [5] => 5 )
 Discuss Question
Answer: Option A. -> Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 )
Question 27. What will be the output of the following PHP code ?
  1.    Array ( [0] => red [1] => green [2] => blue [3] => yellow )
  2.    Array ( [0] => blue [1] => yellow [2] => red [3] => green )
  3.    Array ( [0] => red [1] => green )
  4.    Array ( [0] => blue [1] => yellow )
 Discuss Question
Answer: Option A. -> Array ( [0] => red [1] => green [2] => blue [3] => yellow )
Question 28. What will be the output of the following PHP code?
  1.    Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
  2.    Array ( [peter] => 35 [ben] => 37 [joe] => 43 )
  3.    Array ( [PETER] => 35 [BEN] => 37 [JOE] => 43 )
  4.    Array ( [PeTeR] => 35 [BeN] => 37 [Joe] => 43 )
 Discuss Question
Answer: Option C. -> Array ( [PETER] => 35 [BEN] => 37 [JOE] => 43 )
Question 29. What will be the output of the following PHP code?
  1.    Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) )
  2.    Array ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) )
  3.    Array ( [0] => Array ( [0] => Volvo [1] => Volvo ) [1] => Array ( [0] => BMW [1] => BMW ) [2] => Array ( [0] => Toyota [1] => Toyota ) )
  4.    Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) )
 Discuss Question
Answer: Option D. -> Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) )
Question 30. 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 ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” )
 Discuss Question
Answer: Option B. -> Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )

Latest Videos

Latest Test Papers