A

Admin • 828.03K Points
Coach

Q. Determine Output

Code:
#include<stdio.h>
#define a 10
void main()
{
#define a 50
printf("%d", a);
}
  • (A) 50
  • (B) 10
  • (C) Comiler error
  • (D) None of these
  • Correct Answer - Option(A)
  • Views: 17
  • Filed under category C Programming
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.