求int类型最大最小值

1、C语言实现code

static const int MAX_INT = (int)( (unsigned)~0>>1);
static const int MIN_INT = (int)( (unsigned)~0>>1)-1;

printf("%d \n", MAX_INT);
printf("%d \n", MIN_INT);

 

结果:im

输出截图

相关文章
相关标签/搜索