-
Which of the following is the correct output for the program given below?
#include <studio.h>
int main ( )
{
int i = 5;
switch (i)
{
printf ("outside case\n");
case 5:
printf ("case 5\n");
break;
case 10:
printf ("case 10\n");
break;
}
return 0;
}
-
- outside case
case 5 - outside case
case 10 - case 5
- case 10
- outside case
case 5
case 10
- outside case
Correct Option: C
Only matching case will be executing.
So ans is case 5