What is the static variable in function useful for?

Posted by Prem Tiwari | Updated on

What is the static variable in function useful for?

A static variable is defined within a function only the first time, and its value can be modified during function calls as follows:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers