Google News
logo
CPP - Quiz(MCQ)
Is the size of character literals different in C and C++?
A)
Implementation defined
B)
No, they are not different
C)
Yes, they are different
D)
Can’t say

Correct Answer :   Yes, they are different


Explanation : In C++, sizeof(‘a’) == sizeof(char) == 1. In C however, sizeof(‘a’) == sizeof(int).

Advertisement