Welcome Guest | Sign in | Register
Switch-case - Discussion Page For Q.10637 | 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)
{
case4: printf("A");
break;
case3: printf("B");
case2: printf("C");
case1: printf("D");
break;
default: printf("E");
}
}
A. C B. D
C. CD D. E

Answer and Explanation

Answer:E

Explanation:
answer E, because no space with case.    

Comment on this Question

Name:

Loading...




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