In the book \"Complete Reference of C\" it is mentioned that char
is by default unsigned.
But I am trying to verify this with GCC as well as Visual Stud
C99 N1256 draft 6.2.5/15 "Types" has this to say about the signed-ness of type char
:
The implementation shall define char to have the same range, representation, and behavior as either signed char or unsigned char.
and in a footnote:
CHAR_MIN
, defined in, will have one of the values
0
orSCHAR_MIN
, and this can be used to distinguish the two options. Irrespective of the choice made,char
is a separate type from the other two and is not compatible with either.