Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
即与此类似的代码,使打印输出未定义。
int a=41; a++ & printf("%d\n", a);
我不知道这个操作到底叫什么。
问题是它没有指定首先评估哪个, theprintf或 the a++,并且因为一个对另一个有副作用(你要么读a然后写然后再读,或者读然后读然后写),你得到未定义的行为。
printf
a++
a