Q35
What will be the output of the program code? #include #define a 10 void main() #define a 50 printf("%d", a);
A.
50
AnswerB.
10
C.
Compiler Error
D.
None of These
Answer: Option A
Solution
Answer: Option A
Solution:
The preprocessor directives can be redefined anywhere in the program. So the most recently assigned value will be taken.