The default statement of a switch is always executed.

  1. True

  2. False


Correct Option: B
Explanation:

To evaluate this statement, we need to understand the behavior of the default statement in a switch statement.

The default statement in a switch statement is optional and serves as a catch-all case. It is executed if none of the other cases match the value being switched.

Now let's go through each option:

A. True: This option is incorrect. The default statement is only executed if none of the other cases match the value being switched. If any of the other cases match, the default statement is skipped.

B. False: This option is correct. The default statement is not always executed. It is only executed if none of the other cases match the value being switched.

Therefore, the correct answer is B. False.

Let me know if you have any further questions!

Find more quizzes: