Home » C Programming » Decision Making » Question
  1. 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;
    }
    1. Error: 'Misplaced Continue'
    2. Bye
    3. No output
    4. Good Morning
      Good Evening
Correct Option: A

Continue should be used within a loop.
'Misplaced Continue'



Your comments will be displayed only after manual approval.