I tried older post but not able to understand following behavior.
https://stackoverflow.com/questions/12295168/c-signed-unsigned-mismatch
unsigned int and signed char comparison
#define T long
int main()
{
unsigned T a;
T b;
a=1;
b=-1;
if(a>b)
printf("True\n");
else
printf("False\n");
return 0;
}
I tried above code for T=char, short int and long.
observed output for char and short is TRUE, while for int and long is FALSE. I tried above code in Ubuntu gcc.
Can anyone explain, why am I getting different output for different data types?