QUIZ 48

Whats the output?
void main()
{
printf(“%d,%d”,sizeof(NULL),sizeof(“”));
}
a. 4,1
b. 2,1
c. Error
d. Either a or b

Answer  : (c)

NULL has  the same size as that of a pointer i.e. 4 or 2B
“” represents null character, so size is 1B

Leave a Reply

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