What will be the output of the following C program segment? char inChar = 'A';…
GATE · 2012 · CS · Computer Science & ITModified — slightly modified from the official paper; see the solution
What will be the output of the following C program segment?
char inChar = 'A';
switch (inChar) {
case 'A': printf("Choice A\n");
case 'B':
case 'C': printf("Choice B");
case 'D':
case 'E':
default: printf(" No Choice");
}- A.
No Choice
- B.
Choice A
- C.
Choice A
Choice B No Choice
- D.
Program gives no output as it is erroneous
Attempted by 1335 students.
Sign up free to check your answer
Sign up freeLoading lesson…