int最小值用二进制表示就是:10000000 00000000 00000000 00000000。int最大值用二进制表示就是:01111111 11111111 11111111 11111111。用代码表示就是:# include <stdio.h>
int main(int argc, char const *argv[])
{
printf("The minimum value of int is %d.\n", 1 << 31);
printf("The maximum value of int is %d.\n", ~(1 << 31));
return 0;
}结果是The minimum value of int is -2147483648.
The maximum value of int is 2147483647.