Teaching Rajasthan Basic Computer Instructor 2021 Mock Test Programming and Data Structure Programming in C
What is the effect of the following code?
int main()
{
int option = 4;
switch (option/2)
{
case 1: printf ("EAST ");
case 2: printf ("WEST ");
case 3: printf ("NORTH ");
case 4: printf ("SOUTH ");
}
}
1
WEST
2
Syntax error because break is missing
3
WEST NORTH SOUTH
4
Syntax error because default case is missing