猿问
解释下++和=++
score++;
能写成score=score++;吗?为什么
qq_氐語_0
浏览 1129
回答 1
1回答
思o念
++是有两种情况的,如:a++;++a;这两个语句在不赋值时,两个语句执行完后,都是自加 1。但是:a = 1;b=a++;和a = 1;b=++a;是不同的,前者b = 1,a = 2;后者b = 2, a = 2;两者最大区别就是先运算再赋值,还是先赋值再运算!所以:score++;可以写成score = ++score;不能写成score = score++;
1
0
0
慕瓜9220888
OQOASCJKHSCHJUWYSODZBQIBRQXAOTBWGPFCLMDRWPPIBLCKMXQWZJZDZRPSOBRFWBSOOONQGKSWODGGTYJRQLMMPVTKZHMEOXKRYKCKGZYREPNMHTQZWABJCKQGCSRSGLDERTDAUDECSLWWCQHBDCMOIKYWFNTWCOHLKCUCELHLCHPOKMSREJXWUURKKOZOMKSCBEJNCHFLVUBWDCAPYUDAPGONJWLVODBJVQHUXXGUMXFFYRHRWOCRKREKSPBMIRCCVPXSGFINHAZRWPNDZICUFJSAJMIZLLQYHQPHKQVLGMSMTBFGPNXGWFYYZEENCSLFNETKZFOEBNYDBJTPRHTOMHFBBUDVGLZOIOOESHIKVYEQAKIEGFZJRCKOXPDGMWCOIDIXWJICRSDFHYYHOWGFXFOOHHXBAPRXZCBEPHDLYBOXJECAJPYIOOWOOWSIBOWHFACCBOBNEDBDZZIOOIIXLVOUXDUJOZZYERSSBWWZYORRVECYHHQDXRAVNGTJWLLZIQGSYVQHPHWFVKZSTBAFUEXLSARDFEHEWHYEWYXXDGSTRPOQKJLNOJPEKDGQNBNJLOLCCLDSPFMZPGIQLBQMPMJQHNZVRBPGAYUJSPZJUWEDMIVPKOHLHJYVJZLYNUZLFIVMEZEQVWNEEZXDCOCZMWGLGMYBFMWWLGCBOSDOWAWFUUKZKFUGPEJWAKOCHNZPLVCKMOJVCMPXJWYNTGAJGMNDOUNUBVZQWFUOBIPULXQTXKRRTHFUZREPCMUSKCSDCWFGFKTMSLLJUJBZZVVIZRVUMSTWPCTLAFBBUKLWAHMVVUREZDSKSREUK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