Static storage class
static variables in c |
static variable have lifetime over entire program run.
scope of this variable is limited based on the place of declaration.
if static variable is defined in a file and not inside any function, then scope of the variable is limited within that file.
if static variable is defined inside a function, then the scope of the variable is limited within that function.
we can use this variable any file and any function indirectly by accessing through pointer.
Comments