Just a quick question...
As far as I know, the size of a character in C is 1 byte.
Can somebody explain why the size of a constant character is 4 bytes? ie:
char c;
sizeof(c) = 1
sizeof('A') = 4
c = 'A';
sizeof(c) = 1
'A' is acharacter, how come the sizeof 'A' is not 4?
- Thanks
As far as I know, the size of a character in C is 1 byte.
Can somebody explain why the size of a constant character is 4 bytes? ie:
char c;
sizeof(c) = 1
sizeof('A') = 4
c = 'A';
sizeof(c) = 1
'A' is acharacter, how come the sizeof 'A' is not 4?
- Thanks