Switch case 6 : Multiple Choice Questions in C Programming

Switch case 6 : Multiple Choice Questions in C Programming

Problem Statement 6 :

void main()
{
int choice = 2 ;
switch(choice);
{

case 1 :
printf("nAllas");
break;

case 2 :
printf("nBabo");
break;

case 3 :
printf("nHurray");
break;
}
printf(" Finally I am in main ");
}
Options : Guess the Output
  1. Finally I am in main
  2. Babo Finally I am in main
  3. Hurray Finally I am in main
  4. Allas Finally I am in main



Why ? Explanation  :
  1. Semicolon at the end of switch will terminate switch block without entering in it
  2. For more details ……

Select Switch Case Question :

Bookmark & Share