You are not logged in.

#1 2015-09-15 05:51:39

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

C Language Control Structures Output:

C Programming Quizzes C Language Control Structures

Directions:
What will be the following code's output if choice = 'R'?

Question:
switch(choice)
{
   case 'R' : printf("RED");
   case 'W' : printf("WHITE");
   case 'B' : printf("BLUE");
   default  : printf("ERROR");break;
}

Option A):
RED
Option B):
RED WHITE BLUE ERROR
Option C):
RED ERROR
Option D):
RED WHITE BLUE

Correct Answer is Option B):
RED WHITE BLUE ERROR


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-15 05:51:39

Advertisement
Ads By Google

Re: C Language Control Structures Output:



Board footer