Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 9

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 122

Answer:

main()
{
int i=3;
switch(i)
{
default:printf("zero");
case 1: printf("one");
break;
case 2:printf("two");
break;
case 3: printf("three");
break;
}
}


Answer :
three


Explanation :
The default case can be placed anywhere inside the loop. It is executed only when all other cases doesn't match.

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 9 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: