가능한 중복 : 그것을 실행할 때
Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc…)일부 C 출력을 설명 할 수 있습니까?
#include<stdio.h>
void call(int,int,int);
int main(){
int a=10;
call(a,a++,++a);
return 0;
}
void call(int x,int y,int z){
printf("x=%d y=%d z=%d\n",x,y,z);
}
이 코드는 12 11 12 나에게 출력을주고있다. 누군가 어떻게 이런 일이 발생했는지 정확히 설명 할 수 있습니까? 당신이 sequence points 사이에 두 번 a
을 변경하고 이후