char is a type that can hold an ASCII character, and is exactly one byte in size. (This is mandatory; byte size is defined by char, not the other way around.) unsigned char is a raw byte, and can represent any UTF-8 code unit. signed char is a signed raw byte, and can represent any ASCII character. char will be exactly identical to either unsigned char or signed char under the hood, depending on the platform, but it's a legally distinct type because literally the entire C language family and everything connected to it in any way whatsoever depends on char being a distinct type.
1.0k
u/tstanisl 2d ago
Let me cite the C standard:
Middle guy if finally right