Examveda
Examveda

Determine Output:
#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 Miscellaneous

Join The Discussion

Comments ( 1 )

  1. Nitin Devghare
    Nitin Devghare :
    3 years ago

    How to solve

Related Questions on C Miscellaneous