In C, the type of a character constant like 'a'
is actually an int
, with size of 4 (or some other implementation-dependent value). In C++, the type is char
, with size of 1. This is one of many small differences between the two languages.
In C, the type of a character constant like 'a'
is actually an int
, with size of 4 (or some other implementation-dependent value). In C++, the type is char
, with size of 1. This is one of many small differences between the two languages.