transferred to the calling function.
A static variable is the one that does not get initialized again and again. The static keyword is
useful for extending the lifetime of a particular variable.
Please note that if you declare a static
variable inside a function, the variable remains even after the function call is long gone (
the
variable is placed in the alterable area of memory).
Also note that the static keyword is
overloaded.
It is also used to declare variables to be private to a certain file only when declared
with global variables. Static variables can also be used with functions, making those functions visible
only to the file itself.
Do'stlaringiz bilan baham: |