qfedu-c-level/day5/homework/h7.c

12 lines
267 B
C
Raw Permalink Normal View History

2023-07-08 16:16:58 +08:00
// 请计算, short n = 112;
// n &= ~(3 << 4);
// n的结果是多少
#include <stdio.h>
int main()
{
short n = 112;
n &= ~(3 << 4); // n = n & (~(3 << 4)) = n & (~48) = n & (-49) = n & 65487 = 112 & 65487 = 112
printf("n = %d\n", n);
return 0;
}