Programming Languages C Objective
Mar 08, 2013

What will be output of the following c code?

void main()
 {
  char c='0';
  printf("%d %d",sizeof(c),sizeof('0'));
 }

Choose the correct answer:
A) 2 3
B) 2 4
C) 1 2
D) 1 4
Detailed Explanation

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

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback