Sunday, March 25, 2012

C interview Questions

I will update links and questions on C language in this post.

1.Assume there is a global variable & a static global 
variable.Both gets memory allocated from the data segment. 
Then how does the visiblity of static global varible gets 
limited to the file alone (in which it gets declared) ???
 
ANS:A static global variable is having internal linkage. Once 
the object file is created, this variable is not given to 
the linker. Hence it is limited to the file alone. 
 
2. 


http://www.interview-made-easy.com/p/c-questions.html

No comments:

Post a Comment