-
Which of the following is the correct output for the program given below ?
#include <stdio.h>
int main ( )
{
int k = 5;
switch (k)
{
case 1:
printf ("Good Morning\n");
case 2:
printf ("Good Evening\n");
break;
case 3:
continue;
default:
printf ("Bye\n");
}
return 0;
}
-
- Error: 'Misplaced Continue'
- Bye
- No output
- Good Morning
Good Evening
Correct Option: A
Continue should be used within a loop.
'Misplaced Continue'