0

So i understand that x++ is changing the vafiable after it is used and ++x before. But in the example of x = 5 y = ++x Why does y not equal 6 when x gets changed before use.

16th Sep 2016, 3:41 PM
sam
2 Respostas
0
y=6 ! it's working.first y equal 1 and 5!
16th Sep 2016, 4:26 PM
sirojiddin
0
yes he has rason, if there x=5 y=x++, y Will be 5 and x=6
18th Sep 2016, 5:59 AM
Gonzalo Rodriguez
Gonzalo Rodriguez - avatar