C Expressions and Control Flow questions

Q3

GATE CS 2012 CSC ProgrammingMCQ1 mark−1/3 if wrong
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" ) ; }
Show answer without attempting

Answer: Marks to all

Q49

GATE CS 2012 CSC ProgrammingMCQ2 marks−2/3 if wrong
What output will be generated by the given code segment if:
Line 1 is replaced by auto int a = 1;
Line 2 is replaced by register int a = 2;
Show answer without attempting

Answer: D

0/20 correct0 marks

Related topics in C Programming