In switch(op){ case '+': ... } the case '+' matches when op is
Q.In switch(op){ case '+': ... } the case '+' matches when op is
A) "+"
B) plus
C) +'
D) 43 as a string
Correct Answer:
Option C
Detailed Explanation:
C) '+' is correct. switch performs multi-way selection using integral or enum-like values such as int and char. Case labels are constants; break exits the switch, while missing break can cause fall-through.