Oh, now I see. You are looking for an example of 'idiosyncrasy of integer promotions' (see, for instance, , however
shaktikanta wrote:
0 is by default unsigned
is a wrong assumption. It is signed, by default. You have to write:
#include <stdio.h>
int main()
{
int k;
if ( 0u < -1)
{
k=5;
}
else
{
k=10;
}
printf("%d\n", k);
return 0;
}
Veni, vidi, vici.