Question
#include<stdio.h>
int X=40;
int main()
{
int X=20;
printf("%d\n", X);
return 0;
}
What would be the output of the following program ?
#include<stdio.h>
int X=40;
int main()
{
int X=20;
printf("%d\n", X);
return 0;
}
Answer: Option A
Was this answer helpful ?
Whenever there is conflict between a local variable and global variable, the local variable gets priority.
Was this answer helpful ?
More Questions on This Topic :
Question 1.
Which of the following statements should be ....
Question 9.
What are the types of linkages?
....
Submit Solution