Sail E0 Webinar
Question

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


Options:
A .  Implementation defined
B .  Can't say
C .  Yes, they are different
D .  No, they are not different
Answer: Option C

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




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers