c语言中算术运算优先级高于移位运算
#include <stdio.h>int main(void){ int a = 1; int b = a<<1+2; printf("%d\n",b); return 0;}上面的这段代码,结果是8,而不是4,因为算术运算优先级高于移位运算。 发布时间: 2013-04-05 10:24:33 作者: rapoo
c语言中算术运算优先级高于移位运算
#include <stdio.h>int main(void){ int a = 1; int b = a<<1+2; printf("%d\n",b); return 0;}上面的这段代码,结果是8,而不是4,因为算术运算优先级高于移位运算。