164k views
0 votes
How would a static local variable be useful?

User Usuario
by
6.1k points

1 Answer

5 votes

Answer: Static local variable is a variable that is initialized as static only one time inside a function and whenever it is called in that function it will be accessible.

Explanation: Static local variables are very useful variables which are declared as static in a particular function. Static local variable is initialized only one time in a function and whenever the function in which it has been declared ,the value of the variable will be accessible by as many times it has been called in the function in which it is declared.

User Bobybx
by
6.1k points