,
Share with your friends 

c language programming

8 ratings Views 134 
Author: vikas_b6a788d7 (vikas saini)  View Profile |  View other solutions by this author

Question / Problem


programming solution in c language

Solution

     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.



Applies to

C

Rank It

Login to rank it

Report


Advertisement