Computer Science, asked by ghoshmahua198, 9 days ago

(d) What will be the output when (i) n=1 (ii)n=2
int x=3;
switch(n)
case 1: ++x;
System.out.println(x);
break;
case 2: X--
System.out.println(x);​

Answers

Answered by preishachettiar
0

Answer:

yr answer is 4

x will first increment then don't decrement it in x-- as it is post increment

Similar questions