Can anyone help me, understand this? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
27th Jan 2021, 5:41 PM
Ira Sarkar
Ira Sarkar - avatar
4 Answers
+ 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
27th Jan 2021, 6:07 PM
XXX
XXX - avatar
30th Jan 2021, 7:08 AM
SERG Starkov
SERG Starkov - avatar
0
XXX thank you so much 🙂😊😅
27th Jan 2021, 6:08 PM
Ira Sarkar
Ira Sarkar - avatar
0
SERG Starkov thank you so much😊
31st Jan 2021, 4:35 AM
Ira Sarkar
Ira Sarkar - avatar