Ex - 1: What is the output?
main()
{
printf("%d", out);
}
int out=100;
Ans:
Compiler error: undefined symbol out in function main.
Explanation:
The rule is that a variable is available for use from the point of declaration. Even though a is a global variable, it is not available for main. Hence an error. |