+ 1
a+ =a++ + ++b + ++a + b++ where a=8 and b=6
4 Réponses
+ 7
int a = 8;
int b = 6;
int c = ((a++)+(++b)+(++a)+(b++));
System.out.println(c);
/*
Output is 32.
I think it looks like this,
Im assuming that the increment that uses the value first increments straight after that value is used then when it reaches the next increment of the same variable a new increment is made which includes any previous increments. 😅
8+7+10+7
*/
+ 2
Such questions are useless because the behavior of multiple ++ operators is often not even defined and also makes the code quite unreadable
+ 2
30
0
Output=38