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
As Paul stated, it's because 'a' is an int in C but a char in C++.
'a'
int
char
I cover that specific difference between C and C++ in something I wrote a few years ago, at: http://david.tribble.com/text/cdiffs.htm