Sail E0 Webinar

MCQs

Total Questions : 29 | Page 2 of 3 pages
Question 11. How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.
  1.    7
  2.    8
  3.    9
  4.    10
 Discuss Question
Answer: Option B. -> 8
Question 12. Say we have two compare two strings which of the following function/functions can you use?
1. strcmp()
2. strcasecmp()
3. strspn()
4. strcspn()
  1.    1 and 2
  2.    3 and 4
  3.    None of the mentioned
  4.    All of the mentioned
 Discuss Question
Answer: Option D. -> All of the mentioned
Question 13. What will be the output of the following PHP code?
  1.    Array ( [0] => pasta [1] => steak [2] => fish [3] => potatoes )
  2.    Array ( [3] => potatoes )
  3.    Array ( [1] => steak )
  4.    Array ( [0] => potatoes )
 Discuss Question
Answer: Option C. -> Array ( [1] => steak )
Question 14. Which one of the following functions will convert a string to all uppercase?
  1.    strtoupper()
  2.    uppercase()
  3.    str_uppercase()
  4.    struppercase()
 Discuss Question
Answer: Option A. -> strtoupper()
Question 15. What will be the output of the following PHP code?
  1.    SaladSaladSaladSaladSalad is good
  2.    is good SaladSaladSaladSaladSalad
  3.    is good Salad
  4.    Salad is good
 Discuss Question
Answer: Option D. -> Salad is good
Question 16. Which one of the following functions can be used to concatenate array elements to form a single delimited string?
  1.    explode()
  2.    implode()
  3.    concat()
  4.    concatenate()
 Discuss Question
Answer: Option B. -> implode()
Question 17. Which one of the following functions finds the last occurrence of a string, returning its numerical position?
  1.    strlastpos()
  2.    strpos()
  3.    strlast()
  4.    strrpos()
 Discuss Question
Answer: Option D. -> strrpos()
Question 18. What will be the output of the following PHP code?
  1.    Contact the author of this article at [email protected]@mple.com
  2.    [email protected] the @uthor of this @rticle @t [email protected]@[email protected]
  3.    Contact the author of this article at [email protected]@[email protected]
  4.    Error
 Discuss Question
Answer: Option C. -> Contact the author of this article at [email protected]@[email protected]
Question 19. What will be the output of the following PHP code?
  1.    [email protected]
  2.    contact
  3.    [email protected]
  4.    examveda.com
 Discuss Question
Answer: Option D. -> examveda.com
Question 20. What will be the output of the following PHP code?
  1.    Array([0]=>0 [1]=>1 [2]=>two [3]=>three [4]=>four [5]=>5)
  2.    Array([2]=>two [3]=>three [4]=>four)
  3.    Array([1]=> 1)
  4.    Array([0]=>0 [1]=>1 [5]=>5)
 Discuss Question
Answer: Option D. -> Array([0]=>0 [1]=>1 [5]=>5)

Latest Videos

Latest Test Papers