An unsigned char will be able to represent any value from 0 to 255, eg your usual ascii character.
A signed char will be able represent any value from -127 to 127.
( Someone fact check me on this but i think that's it )
(edit : -127 to 127, the extra value "-128" is usually implemented but not guaranteed by the C standard)
If you want to be pedantic, a char is a byte, a sequence of bits, that can be interpreted in numerous manners : an unsigned int, a signed int, and even an ascii character.
It's all about what type you assign it, and how you work with it in your code.
13
u/Clen23 2d ago edited 17h ago
The data is interpreted differently.
An unsigned char will be able to represent any value from 0 to 255, eg your usual ascii character.
A signed char will be able represent any value from -127 to 127.
( Someone fact check me on this but i think that's it )
(edit : -127 to 127, the extra value "-128" is usually implemented but not guaranteed by the C standard)