Home » C Programming » Decision Making » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int n = 1;
    switch (n)
    {
    case n:
    printf("Case N ");
    default:
    printf("Default");
    }
    }
    1. Compilation Error
    2. Case N
    3. Default
    4. All of above
    5. None of these
Correct Option: A

Compilation Error

In function 'int main()':
error: 'a' cannot appear in a constant-expression
case a:



Your comments will be displayed only after manual approval.