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

12 lines
206 B
C
Raw Normal View History

2023-07-08 16:16:58 +08:00
// 请计算, char n = 1;
// n = ~n;
// n的结果是多少
#include <stdio.h>
int main()
{
char n = 1;
n = ~n; // n = ~n = ~00000001 = 11111110 = -2
printf("n = %d\n", n);
return 0;
}