Home / Programming MCQs / PHP MCQs / Question

R

Ram Sharma • 188.81K Points
Coach

Q. What will be the output of the following PHP code?

Code:
<?php
$car = "Honda";

switch ($car) {
    case "Honda":
        echo "You selected Honda.";
    case "BMW":
        echo "You selected BMW.";
    case "AUDI":
        echo "You selected Audi.";
    default:
        echo "None is selected.";
}
?>
(A) You selected Honda.
(B) You selected Honda.You selected BMW.
(C) You selected Honda.You selected BMW.You selected Audi.
(D) You selected Honda.You selected BMW.You selected Audi.None is selected.

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.