Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 97;
    switch (x)
    {
       case 'a':
          printf("yes ");
          break;
       case 97:
          printf("no\n");
          break;
    }
}

A. yes

B. yes no

C. Duplicate case value error

D. Character case value error

Answer: Option C


This Question Belongs to C Program >> Control Structures

Join The Discussion

Related Questions on Control Structures