Sail E0 Webinar

MCQs

Total Questions : 103 | Page 3 of 11 pages
Question 21. Which of the below symbols is a newline character?
  1.    \r
  2.    \n
  3.    /n
  4.    /r
 Discuss Question
Answer: Option B. -> \n
Question 22. What will be the output of the following PHP code?
  1.    What is her age? n She is $num years old
  2.    What is her age? She is $num years old
  3.    What is her age? She is 10 years old
  4.    What is her age?n She is 10 years old
 Discuss Question
Answer: Option A. -> What is her age? n She is $num years old
Question 23. Which of the conditional statements is/are supported by PHP?
1. if statements
2. if-else statements
3. if-elseif statements
4. switch statements
  1.    Only 1
  2.    1, 2 and 4
  3.    2, 3 and 4
  4.    All of the mentioned.
 Discuss Question
Answer: Option D. -> All of the mentioned.
Question 24. What will be the output of the following PHP code?
  1.    I love arsenal
  2.    Error
  3.    I love arsenalI love manc
  4.    I love arsenalI love mancI love manu
 Discuss Question
Answer: Option C. -> I love arsenalI love manc
Question 25. Which of the looping statements is/are supported by PHP?
1. for loop
2. while loop
3. do-while loop
4. foreach loop
  1.    1 and 2
  2.    1, 2 and 3
  3.    All of the mentioned
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> All of the mentioned
Question 26. What will be the output of the following PHP code?
  1.    AshleyBale
  2.    AshleyBaleBlank
  3.    ShrekBlank
  4.    Shrek
 Discuss Question
Answer: Option B. -> AshleyBaleBlank
Question 27. If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed?
  1.    12
  2.    1
  3.    Error
  4.    5
 Discuss Question
Answer: Option D. -> 5
Question 28. What is the value of $a and $b after the function call?
  1.    a is 3 and b is 4
  2.    a is 4 and b is 3
  3.    Both are 3
  4.    Both are 4
 Discuss Question
Answer: Option B. -> a is 4 and b is 3
Question 29. Who is the father of PHP?
  1.    Rasmus Lerdorf
  2.    Willam Makepiece
  3.    Drek Kolkevi
  4.    List Barely
 Discuss Question
Answer: Option A. -> Rasmus Lerdorf
Question 30. How does the identity operator === compare two values?
  1.    It converts them to a common compatible data type and then compares the resulting values
  2.    It returns True only if they are both of the same type and value
  3.    If the two values are strings, it performs a lexical comparison
  4.    It bases its comparison on the C strcmp function exclusively
  5.    It converts both values to strings and compares them
 Discuss Question
Answer: Option A. -> It converts them to a common compatible data type and then compares the resulting values

Latest Videos

Latest Test Papers