Correct Answer : D
The program execution starts from the main
function. The integer variable month
is initialised to 5
. We know that switch
is a condition variable function or a selection control mechanism, which works with the variable used to invoke switch
function. As the month
points to the value 5
, case 5
will be considered and its corresponding text will be printed if available. After that, as the break
statement isn't encountered, the control goes to the next case
till a break
statement is encountered. So, Second Quarter will be printed. Then, a break
statement is encountered and so the control comes out of the switch
function and hence the program terminates.
The answer is D.