Home » C Programming » Control Instructions

Point out the error, if any in the program. #include int main() { int i = 1; switch(i) { case 1: printf("Case1"); break; case 1*2+4: printf("Case2"); break; } return 0; }

Correct Answer: No Error

Explanation:

Constant expression are accepted in switch


It prints "Case1"


← Previous Question Next Question→

More Questions from Control Instructions

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion