You are not logged in.

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

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
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


Failure is the first step towards seccess.

2015-09-15 05:51:40

Advertisement
Ads By Google

Re: C Language Control Structures Output:



\n

Board footer