Pay attention to the difference x++
and ++x
and x=x+1
, simply you can regard x++
as the following 2 steps:
- return x for computing
- x=x+1
and the ++x
means:
- x=x+1
- return x for computing
So, the code you write actually compute (19 + 11) + (20 - 3) = 47, and finally a=10, b=2, c=21.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…