了解底層工作細(xì)節(jié)有時候很有用
學(xué)習(xí)C語言時,大家應(yīng)該都見過類似的習(xí)題:
例如:
C源代碼:
-----------------------------
#include <stdio.h>
int main()
{? ?
???int a = 5;
???int q = (++a)+(++a)+(++a);? ??
? ? printf("%d , %d \n", a, q) ;? ?
???return 0;
}
-----------------------------
輸出結(jié)果:8 24(說明:不同的編譯環(huán)境,結(jié)果可能不一樣)
q為什么是24?

標(biāo)簽: