What will be the value of variable ‘X’ , after executing the following expression ? int Y=5, Z=2, W=9; int X= Y-- + ++W – Z++ + ++Y – W-- + ++Z + --Y;
Answers
Answered by
1
X=5+10-2+4
EXPLANATION
Y WILL BE 5 ONLY CUZ IT IS POST INCREMENT
W WILL BECOME 10 AS IT IS HAVING PRE INCREMENT
Z WILL BE SAME CUZ POST DECREMENT
Similar questions