两种方法求Int最值

来源:转载

#include <stdio.h>
int main()
{
unsigned int temp;
int Max,Min;

Min=0x7fffffff+1;
Max=0x7fffffff;
printf("IntMax is %d/n",Max);
printf("IntMin is %d/n",Min);

temp=(unsigned int)-1;
Max=temp>>1;
Min=~(temp>>1);
printf("IntMax is %d/n",Max);
printf("IntMin is %d/n",Min);
return 0;
}


分享给朋友:
您可能感兴趣的文章:
随机阅读: