Welcome Guest | Sign in | Register
Switch-case - Discussion Page For Q.10642 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Switch-case > Questions and Answers

Q: What is the output of following program?

void main(){
int a=2;
switch(a)
{
case 4: printf("A");
break;
case 3: printf("B");
case default : printf("C");
case 1 : printf("D");
break;
case 5 : printf("E");
}
}
A. A B C B. A B C E
C. A B C D E D. error

Answer and Explanation

Answer:error

Explanation:
switch(a);
terminated by ;

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.