Multiple choice

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’ : print f(”Choice B”); case ‘D’ case ‘E’ default : printf (“No Choice”) ; }

  1. No choice

  2. Choice A

  3. Choice A, Choice B No choice

  4. Program gives no output as it is erroneous

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Since there is no ‘break’ statement, the program executes all the subsequent case statements after printing “choice A”