1.

What Do You Mean By Static Variables?

Answer»

Static is an access qualifier that limits the SCOPE of the variable but causes the variable to EXIST for the lifetime of the program. This means a static variable is one that is not seen outside the function in which it is declared as its scopeis limited to the block of code in which it has been created but its lifespan remains until the program terminates.

The value of such a variable will remain and MAY be seen even after CALLS to a function also the declaration statement of such TYPE of a variable inside a function is executed only once.

Static is an access qualifier that limits the scope of the variable but causes the variable to exist for the lifetime of the program. This means a static variable is one that is not seen outside the function in which it is declared as its scopeis limited to the block of code in which it has been created but its lifespan remains until the program terminates.

The value of such a variable will remain and may be seen even after calls to a function also the declaration statement of such type of a variable inside a function is executed only once.



Discussion

No Comment Found