You are not logged in.

#1 2015-04-18 05:05:09

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

Preprocessor Directives:

Directions:

#include<stdio.h>
#define a 10
void main()
{
      #define a 50
      printf("%d", a);
}

Question:
What will be the output of the program code?

Option A):
50
Option B):
None
Option C):
Compiler Error
Option D):
10

Correct Answer is Option A):
50

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


Failure is the first step towards seccess.

2015-04-18 05:05:09

Advertisement
Ads By Google

Re: Preprocessor Directives:



\n

Board footer