0

If x=10 & y=20 then what will be the values of x and y after execution of the statement x+=(y++ - --y)*y++

Will final value of y be 20 or 21?

22nd Jan 2019, 3:11 AM
Shivam Srivastava
Shivam Srivastava - avatar
2 Respostas
+ 6
y will be 21. First y will be incremented to 21. Then, decremented to 20. Again, incremented to 21.
22nd Jan 2019, 3:54 AM
Arushi Singhania
Arushi Singhania - avatar
0
So finally y=21
22nd Jan 2019, 4:00 AM
Shivam Srivastava
Shivam Srivastava - avatar