Teaching Rajasthan Basic Computer Instructor 2021 Mock Test Programming and Data Structure Programming in C
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” ) ;
}
1
No Choice
2
Choice A
3
Choice A
Choice B No Choice
4
Program gives no output as it is erroneous