| What, if anything, is wrong with the following code? void test(int x) { switch (x) { case 1: case 2: case 0: default: case 4: } } Select the one correct answer. -
The variable x does not have the right type for a switch expression. -
The case label must precede case label 1 . -
Each case section must end with a break statement. -
The default label must be the last label in the switch statement. -
The body of the switch statement must contain at least one statement. -
There is nothing wrong with the code. |