Welcome Guest | Sign in | Register
Preprocessor Directives - Discussion Page For Q.10602 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Preprocessor Directives > Questions and Answers

Exercise:

Section 1

Q: What is the output of following C code?
#if something == 0
int some=0;
#endif

main()
{
int thing = 0;
printf("%d %d\n", some ,thing);
}
A. 0 B. null
C. 0 0 D. error

Answer and Explanation

Answer:0 0

Explanation:
This code is to show that preprocessor expressions are not the same as the ordinary expressions. If a name is not known the preprocessor treats it to be equal to zero.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.