integer promotion and conversion
When you write 'a + b' in C, you might assume the two values are added just as they are. But before the addition even happens, the compiler may quietly change their types, widening narrow values and reconciling signed with unsigned. These automatic, behind-the-scenes type changes are integer promotion and conversion, and because they are invisible in the source, they are a rich source of 'why is the answer wrong?' surprises.
Integer promotion is the first rule: any value of a type narrower than int (a char, a short, a bit-field) is promoted to int before arithmetic. So adding two unsigned char values, each 200, does not wrap at 255 — both are promoted to int, and the result is 400, an ordinary int. Then come the 'usual arithmetic conversions' that align the two operands of a binary operator to a common type: roughly, the narrower is widened to the wider, and — the dangerous part — if one operand is unsigned and the other signed of the same width, the SIGNED one is converted to unsigned. That is how the comparison '-1 < 1u' ends up FALSE: the -1 becomes a huge unsigned value.
Conversions also happen on assignment and on passing arguments: storing a wide value into a narrower type truncates it (keeping only the low bits), and converting between signed and unsigned reinterprets the bit pattern. None of this is random — the rules are precise and worth learning — but it is easy to be caught out. The practical defence is to keep types consistent within an expression, avoid mixing signed and unsigned, make conversions explicit with a cast when you truly mean them, and turn on warnings like -Wconversion and -Wsign-conversion so the compiler points at the silent changes before they bite.
unsigned char a = 200, b = 200; int s = a + b; gives s == 400, because both promote to int before adding. But if (-1 < 1u) is FALSE: -1 converts to UINT_MAX in the comparison.
Narrow types promote to int; signed/unsigned mixes convert the signed one.
Promotion to int means narrow unsigned types do NOT wrap during arithmetic the way you might expect — they compute in int first; conversely, mixing signed and unsigned can silently turn a negative value into a huge positive one.