MENU
Question -

What will be the size of the following constants : “\a”. “\a”, “Manoj\’s”, ‘\”, “XY\ YZ”



Answer -

‘\a’ – size is 1 as there is one character and it is a string literal enclosed in single quotes.
“\a” – size is 1 as there is one character enclosed in double quotes.
“Manoj\’s” – size is 7 because it is a string having 7 characters enclosed in double quotes.
“\” – size is 1. It is a character constant and is containing just one character \”.
“XY\ – size is 4. It is a multiline string create YZ” with \ in the basic string.

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×