ExamVeda
Login
Home
This question belongs to C Program C Miscellaneous
C Miscellaneous
?

Determine Output:
#define int char
void main()
{
      int i = 65;
      printf("sizeof(i)=%d", sizeof(i));
}

Answer & Solution
Correct Answer: Option B

Since the #define replaces the string int by the macro char.

Examveda
Question posted by Examveda
Community

Join the Discussion

3 Comments
Mainak Karmakar
Mainak Karmakar 5 years ago
according to the size of byte that takes "sizeof" to store given data is 1. so the answer should be one
Tararam Goyal
Tararam Goyal 9 years ago
output of the above code is depends upon compiler ( vary compiler to compiler) according to option correct option is "sizeof(i)=2"
Camadi Chanal
Camadi Chanal 9 years ago
Please explain the answer sir