I am trying to compare an unsigned int with a signed char like this:
int main(){ unsigned int x = 9; signed char y = -1; x < y ? printf(\"s\") : pri
Ran the following code:
int main(){ unsigned int x = 9; signed char y = -1; printf("%u\n", (unsigned int)y); x < (unsigned int)y ? printf("s") : printf("g"); return 0; }
The output is:
4294967295 s
After a casting, y takes a very large value. That is why output is s.