分类: C/C++
2014-09-21 12:55:45
原文地址:C语言中<<,>>运算符的优先级小于+,- 作者:andyhzw
测试代码:
#include
int main(void)
{
int n = 0;
int i = 0;
i = 0x00ffffff;
n = i>>16+3;
printf("i = 0x%x\n",i);
printf("n = i>>16+3\n");
printf("n = 0x%x\n",n);
n = (i>>16)+3;
printf("\nn = (i>>16)+3\n");
printf("n = 0x%x\n",n);
return 0;
}
结果: