Home » C++ Programming » Data Types » Question
  1. Is the size of character literals different in C and C++?
    1. Yes, they are different
    2. Implementation defined
    3. No, they are not different
    4. Can’t say
    5. None of these
Correct Option: A

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



Your comments will be displayed only after manual approval.