Vidyalelo
C Programming · Q33

C Preprocessor

Programming · C Programming · question 33

Q33

What will be the output of the program? #include #define int char void main() int i = 65; printf("sizeof(i)=%d", sizeof(i));

A.
sizeof(i)=2
B.
sizeof(i)=1
Answer
C.
Compiler Error
D.
None of These

Answer: Option B

Solution

Answer: Option B
Solution:

Since the #define replaces the string int by the macro char.
So, here i is a variable of type char and not int.