1.

A typical switch body looks as follows: switch (controlling_expression) { case label1: /*label1 statements*/ break; case label2: /*label1 statements*/ break; default: /*Default statements*/ }

A. switch body may not have any case label at all and it would still compile.
B. switch body may not have the default label and it would still compile.
C. switch body may contain more than one case labels where the label value of these case is same and it would still compile. If switch controlling expression results in this case label value, the case which is placed first would be executed.
D. switch body may not have any break statement and it would still compile.
Answer» D. switch body may not have any break statement and it would still compile.


Discussion

No Comment Found

Related MCQs