In C, a char
(including signed char
and unsigned char
) is used to store a byte, which the C standard defines as a small integer at least 8 bits in size.
Having signed and unsigned bytes is as useful as having larger integers. If you're storing a very large number of small numbers (0..255 for unsigned, -127..127 for signed[1]) in an array, you may prefer to use bytes for them rather than, say, short ints, to save space.
Historically, a byte and a text character were pretty much the same thing. Then someone realized there are more languages than English. These days, text is much more complicated, but it is too late to change the name of the char
type in C.
[1] -128..127 for machines with two's complement representation for negative numbers, but the C standard does not guarantee that.