Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
switch (ch)
{
   case 'a':
   case 'A':
      printf("true");
}

A. if (ch == 'a' && ch == 'A') printf("true");

B. if (ch == 'a')
if (ch == 'a') printf("true");

C. if (ch == 'a' || ch == 'A') printf("true");

D. none of the mentioned

Answer: Option C


This Question Belongs to C Program >> Control Structures

Join The Discussion

Related Questions on Control Structures