ramu wrote:
can anyone tell me how the c compiler remembers the changes
made to the static variable?
As I understand it, it is often the same way that it "remembers"
the values of global variables. The only thing that is different
is that the *name* of the storage (the variable name) has a limited
scope. So, you can think of a static variables as a hybrid between
a global variable and a local variable. It has a lifetime much like
a global variable but a scope just like a local variable.
- Logan