同变量自赠运算

来源:互联网 发布:淘宝店铺抽奖中奖结果 编辑:程序博客网 时间:2024/05/01 20:45
a++ + a++
it first calculates a + a then does ++ twice

think of it like
a = 3 + 3
a = 6++ ++
a = 7++
8


++a + ++a
it first does ++a twice, then a + a
a = ++ ++3
a = ++4
a = 5
a = 5 + 5
10

原创粉丝点击