Question
#include<stdio.h>
int X=40;
int main()
{
int X=40;
{
int X=20;
printf("\n%d", X);
}
printf("%d", X);
return 0;
}
What would be the output of the following program ?
#include<stdio.h>
int X=40;
int main()
{
int X=40;
{
int X=20;
printf("\n%d", X);
}
printf("%d", X);
return 0;
}
Answer: Option B
Was this answer helpful ?
In case of conflict between local variables the one which is more local gets the priority.
Was this answer helpful ?
More Questions on This Topic :
Question 6.
What are the types of linkages?
....
Submit Solution