Consider the following program code and give output of each value of ‘ch’ :
i) ch=’A’ , ii) ch=’o’, iii) ch=’e’ (3 X 2 = 6 )
int x=0;
switch(ch)
{
case ‘a’: x+=1;break
case ‘e’ : x+=1;
case ‘I’ : x+=1: break;
case ‘o’ : x+=1 : System.out.println(x+” “); break;
case ‘u’ : x+=1 : System.out.print(x);
default : System.out.println(“Not a lowercase vowel “);
}
Answers
Answered by
3
Answer:
case ‘e’ : x+=1;
Explanation:
Mark me as brilliant
Similar questions