Sail E0 Webinar

MCQs

Total Questions : 121 | Page 1 of 13 pages
Question 1. What will be the output of the following PHP code ?# echo "Hello world";echo "# Hello world";
  1.    Error
  2.    # Hello world
  3.    Hello world# Hello world
  4.    Hello world
 Discuss Question
Answer: Option B. -> # Hello world
Question 2. What will be the output of the following PHP code ?
  1.    Error
  2.    Nothing
  3.    Missing semicolon error
  4.    Hello World
 Discuss Question
Answer: Option B. -> Nothing
Question 3. What will be the output of the following PHP code ?$color = "red";echo "$color";echo "$COLOR";echo "$Color";
  1.    redredred
  2.    red
  3.    redred
  4.    Error
 Discuss Question
Answer: Option B. -> red
Question 4. What will be the output of the following PHP code ?print_r "Hello world"
  1.    Missing semicolon error
  2.    Hello World
  3.    Error
  4.    Nothing
 Discuss Question
Answer: Option C. -> Error
Question 5. What will be the output of the following PHP code ?echo "Hello World"
  1.    Hello world in italics
  2.    Error
  3.    Nothing
  4.    Hello world
 Discuss Question
Answer: Option A. -> Hello world in italics
Question 6. What will be the output of the following PHP code ?echo "echo "Hello World"";
  1.    Error
  2.    echo Hello world
  3.    echo “Hello world”
  4.    Hello world
 Discuss Question
Answer: Option A. -> Error
Question 7. What will be the output of the following PHP code ?$color = red;echo "$color" . red ;
  1.    red
  2.    red red
  3.    error
  4.    nothing
 Discuss Question
Answer: Option C. -> error
Question 8. What will be the output of the following PHP code ?< ? php < ? php echo "Hello world"; ? > ? >
  1.    Nothing
  2.    Hello world
  3.    Hello
  4.    Error
 Discuss Question
Answer: Option D. -> Error
Question 9. What will be the output of the following PHP code ?$color = red;echo "$color";
  1.    $color
  2.    Error
  3.    red
  4.    red
 Discuss Question
Answer: Option A. -> $color
Question 10. What will be the output of the following PHP code ?$color1 = red;$color2 = green;echo "$color1"."$color2";
  1.    red green
  2.    green
  3.    error
  4.    red
 Discuss Question
Answer: Option C. -> error

Latest Videos

Latest Test Papers