-
Which of the following errors would be reported by the compiler on compiling the program given below?
#include <studio.h>
int main ( )
{
int a = 5;
switch (n)
{
case 1 :
..
case 2 :
..
case 3 + 5 :
..
case a :
..
}
return 0;
}
-
- Variables cannot be checked using a switch as in case a.
- Expression as in case 3 + 5 is not allowed.
- All cases in the switch are not unique
- There is no break statement in each case.
- There is no continue statement in each case.
Correct Option: A
Variables cannot be checked using a switch as in case a.