C - Keywords - Discussion

You Are Here :: Home > C > Keywords - Discussion

 



Q.

What will be output if you will compile and execute the following c code?

#include
int main()
{
char c='0';
printf("%d %d",sizeof(c),sizeof('0'));
return 0;
}

A. 1 1 B. 2 2
C. 1 2 D. 2 1

Answer: Option C
Explaination:

 


Size of char data type is one byte while size of character constant is two byte



Discussion

Your Comments Goes here...
NameDiscussion