Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Is the size of character literals different in C and C++?

a) Implementation defined
b) Can’t say
c) Yes, they are different
d) No, they are not different

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

Join The Discussion