C char Keyword
Definition and Usage
The char
keyword is a data type that is used to store a single character.
A char value must be surrounded by single quotes, like 'A' or 'c'.
The signed
and unsigned
keywords treat the char
as an integer type.
A signed char
can represent values between -128 and 127.
An unsigned char
can represent values between 0 and 255.
Related Pages
The unsigned
keyword can allow a char
to represent larger positive numbers by not representing negative numbers. This does not have an effect on how characters are stored and represented.
Read more about data types in our C Data Types Tutorial.