Declare the function static.
Local function variables defined static remain in memory at all times. Such variables are only in scope (accessible) when the function itself is in scope.
Scope is generally defined as variable or functions life... Generally the life is between the opening braces and close braces "{ }" ... If thee variable is defined as "static" and if is defined outside a function then its scope is in same file. if defined as global then its scope is across the files.
The Scope of a variable defines the areas of a program where this variable would be visible and can be used. For ex: a. Method variables - are visible only inside the method where they are declared and hence their scope is only the method b. Class variables - are visible inside the class and can be used by any method inside the class and hence their scope is the whole class.
If you define a variable inside of your function, the variable can be referred and used only inside of that function. It means that you will not able to use the variable in another function (including main). Area of code where your variable can be used after declaration is usually called visibility of the variable.
bush
What is the nature and scope of Labour economics?
nature and scope of guest room maintenance
nature and scope of population geography
nature and scope of population geography
what is the nature and scope of educational management
nature and scope of guest room maintenance
what is sociology: nature and scope?
scope
What is the nature and scope of educational research?Read more: http://wiki.answers.com/Q/What is the nature and scope of educational research#ixzz2T3C7IyRa
Explain the nature & scope of business economics.
nature and scope of women education in secondary educaion