Computer Science, asked by nikhilanuj29, 6 months ago

State the output of the following code?

int choice =1, x =0, y=0, z=0;

switch( choice++)

{

case 2: x++;

y--;
z++;

break;

case 3: x+ =2;

y+= 3;

z- = 3;

default: ++x;

++y;

++z;

}

System.out.println( “x =”+x+”y=”+y+”z=”+z) ;

Answers

Answered by shyamlic
2

Answer:

sorry.....I can't understand your question.......

Answered by rohitkhajuria90
1

OUTPUT: x =1y=1z=1

case will switch to default statement as choice is 1 at that time.

Similar questions