English, asked by ayshaaslam1994aaaa, 8 months ago

Describe the static variable with examples.​

Answers

Answered by utsavsinghal
0

Answer:

A static variable remains in memory while the program is running. A normal or auto variable is destroyed when a function call where the variable was declared is over. For example, we can use static int to count a number of times a function is called, but an auto variable can't be used for this purpose.

Similar questions