= Static variable
{wiki=Static_variable}
A static variable is a variable that retains its value across multiple function calls and is shared by all instances of a class. The concept of static variables can differ somewhat based on the programming language being used. Here are the general characteristics of static variables: \#\#\# In Programming Languages: 1. **In C and C++:** - A static variable declared within a function has a local scope but retains its value between invocations of the function.
Back to article page