#include<stdio.h>
#include<string.h>
#define INT_MAX 2147483647 
#define INT_MIN (-INT_MAX - 1) 
int checktruefalse(int a);
int main()
{
    printf("-2147483647-1 == 2147483648u");
    checktruefalse(-2147483647-1 == 2147483648u);
    
    printf("-2147483647-1 < 2147483647");
    checktruefalse(-2147483647-1 < 2147483647);
    
    printf("-2147483647-1 < -2147483647");
    checktruefalse(-2147483647-1 < -2147483647);
    
    printf("(unsigned)-2147483647-1 < 2147483647");
    checktruefalse((unsigned)-2147483647-1 < 2147483647);
    return 0;
}
int checktruefalse(int a)
{
    if(a)
    {
         printf("   yes\n");
         return 1;
    }
    else
    {
          printf("   no\n");
          return 0;
    }
}

posted on 2022-12-22 08:54  朴伤色  阅读(38)  评论(0)    收藏  举报