What is the effect of the following code?

1.5 What is the effect of the following code?
main() { int option=4;
switch(option/2)
{ case 1: printf(“EAST ”);
case 2: printf(“WEST ”);
case 3: printf(“NORTH ”);
case 4: printf(“SOUTH ”); } }
A) WEST
B) Syntax error because break is missing
C) WEST NORTH SOUTH
D) Syntax error because default case is missing


Leave a Reply