All static and global variables are kept in the data section. Scope could be maintained by kind of name-mangling. So var1 at global scope is ::var1 and var1 inside some function f is ::f::var1
Unless explicitly specified, Precedence is given to var with most number of scopes. Non-static non-global variables are allocated on stack. So when a function is called, its variables are allocated space on the stack. During recursion, the stack grows and thus, the state of each function is maintained. That is why, we can return safely from a function call and the context of function call still remains as it was left before function call. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
