main() { unsigned x = 1; char y = -1; if (x > y) printf(\"x>y\"); else printf(\"x<=y\"); }
I expected
When using signed and unsigned in single operation the signed got promoted to unsigned by C's automatic type conversion. If the bit patter of -1 is considered an unsigned number then it is a very very high value. So x > y is false.
-1
x > y