Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 43

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 79

Answer:

main()
{
printf("%d", out);
}
int out=100;


Answer:
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.

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 43 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: