What will be the output of the following C code?
#include <stdio.h>
switch (ch)
{
case 'a':
case 'A':
printf("true");
}
#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
Join The Discussion