12345678910



Question 1: Which of the following errors would be reported by the compiler on compiling the program given below?

#include<stdio.h>
int main()
{
int a = 5;
switch(a)
{
case 1:
printf("First");

case 2:
printf("Second");

case 3 + 2:
printf("Third");

case 5:
printf("Final");
break;

}
return 0;
}

1. There is no break statement in each case.
2. Expression as in case 3 + 2 is not allowed.
3. Duplicate case case 5:
4. No error will be reported.