There are three char types: (plain) char
, signed char
and unsigned char
. Any char is usually an 8-bit integer* and in that sense, a signed
and unsigned char
have a useful meaning (generally equivalent to uint8_t
and int8_t
). When used as a character in the sense of text, use a char
(also referred to as a plain char). This is typically a signed char
but can be implemented either way by the compiler.
* Technically, a char can be any size as long as sizeof(char)
is 1, but it is usually an 8-bit integer.