Vidyalelo
Java Programming · Q38

Flow Control

Programming · Java Programming · question 38

Q38

What is the printout of the following switch statement? char ch = 'a'; switch (ch) case 'a': case 'A': System.out.print(ch); break; case 'b': case 'B': System.out.print(ch); break; case 'c': case 'C': System.out.print(ch); break; case 'd': case 'D': System.out.print(ch);

A.
abcd
B.
aa
C.
a
Answer
D.
ab
E.
abc

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board