谁来帮我解释下这个可好?
#include <iostream>using namespace std;
int main()
{
unsigned char a=0xA5;
unsigned char b=~a>>4;
printf("b=%d\n",b);
}
#include <iostream>
using namespace std;
int main()
{
unsigned char a=0xA5;
unsigned char b=(~a)>>4;
printf("b=%d\n",b);
}
#include <iostream>
using namespace std;
int main()
{
unsigned char a=0xA5;
unsigned char b=~(a>>4);
printf("b=%d\n",b);
}
他们的答案为啥都是一样的啊?希望能有一个详细的运算过程