What is the size of character in C and C++ ? As far as I know the size of char is 1 byte in both C and C++.
In C:
#include
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.
'a'
int
char