Computer Science, asked by arundevadig0, 9 months ago

What will be the output? #include
#define a 10
int main()
{
printf("%d",a);
int a=50;
printf("%d",a);
return 0;
}
A)10 10
B)10 50
C)50 50
D)compilation error

Answers

Answered by PhysicsForever
0

Answer:

The output will be :

D) There will be compilation error, because a has been defined as a given value variable at the start of the program , also because the output could have been correct if a defined outside the main function would have been defined as a global variable outside the main function and then accessed by using the scope resolution operator inside the main function.

Hope this helps you !

Similar questions