0
Can anyone help me, understand this?
4 Réponses
+ 2
Line 5, x = 4
Line 6,
y = —x;
here the prefix decrement operator is used. So before the statement is executed, 1 is subtracted from x. So now
x = 3
and then x is assigned to y. So
y = 3
Line 7,
z = x—
here the postfix decrement operator is used. So first z is assigned the value of x. So now
z = 3
then the decrement operation is done on x and 1 is subtracted on x. So
x = 2
The final values
x = 2, y = 3, z = 3
and these values are printed on lime 8
+ 1
0
XXX thank you so much 🙂😊😅
0
SERG Starkov thank you so much😊