(xvi)
Consider the following program segment and select the output of the same
when n= 10:
switch(n)
{case 10 : System.out.printIn(n*2);
case 4: System.out.printIn(n*4); break;
default : System.out.println(n);
}
(a)
20
40
(b)
10
4
(c) 20,40
(d)
10
10
Solution
(a)
20
40