huoxiangdong / Blog

学习记录
0 stars 0 forks source link

n++ && ++n #31

Open huoxiangdong opened 6 years ago

huoxiangdong commented 6 years ago

n++,是先赋值在自增1,假设n= 2, x = n++,则x= 2,n= 3 同理,++ n是先自增在赋值,假设n= 2, x = ++n, 则 x = 3,n = 3