Const int perplexed = 2;#define perplexed 3main(){ #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed);}

A) none of the above
B) 4
C) 2
D) 0

Showing Answers 1 - 12 of 12 Answers

bharath

  • Jul 16th, 2006
 

ans will be two not 4 as that value perplexed is const variable and a const can not be changed

  Was this answer useful?  Yes

rts2006

  • Nov 11th, 2006
 

The answer is 4.

because The program is first preprocess to deal with macro, then the code become

const int perplexed = 2;
main()
{
printf("%d",4);
}

so, the result would be 4.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions