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
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
Math,
5 months ago
Social Sciences,
5 months ago
Computer Science,
5 months ago
Math,
11 months ago
Social Sciences,
11 months ago
Math,
1 year ago