请教一个C++运算符优先级的问题
unsigned char a=0xA5;(1)
unsigned char b=~a>>4;
printf("%d\n",b);//245
(2)
unsigned char b=~(a>>4);
printf("%d\n",b);//245
(3)
unsigned char b=(~a)>>4;
printf("%d\n",b);//245
(4)
unsigned char b=~a;
unsigned char c=b>>4;
printf("%d\n",c);//5
(1)中输出245,因为>>优先级比~ 高
(2)中很显然也会输出245
为什么(3)还是输出245呢?为什么不是先求反呢?
谢谢赐教...