R

Rajeev Malhotra • 3.97K Points
Extraordinary

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

Explanation by: Rajeev Malhotra
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.


Question analytics