Examveda
Examveda

What will be the output of the program code?
#include<stdio.h>
#define a 10
void main()
{
      #define a 50
      printf("%d", a);
}

A. 50

B. 10

C. Compiler Error

D. None of These

Answer: Option A

Solution(By Examveda Team)

The preprocessor directives can be redefined anywhere in the program. So the most recently assigned value will be taken.


This Question Belongs to C Program >> C Preprocessor

Join The Discussion

Related Questions on C Preprocessor