You are not logged in.
- Topics: Active | Unanswered
Pages:: 1
#1 2015-04-18 05:05:09
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.
Offline
2015-04-18 05:05:09
- Advertisement
- Ads By Google
Re: Preprocessor Directives:
\n
Pages:: 1