Characteristics of static local variables:
1. It will not change as the function is called and exits. However, although the variable continues to exist, it cannot be used. If the function that defines it is called again, it can continue to be used, and the value left after the previous call is saved
2. Static local variables will only be initialized once
3. Static properties can only be initialized Is a character value or a constant, expressions cannot be used. Even if a local static variable is defined without an initial value, the system will automatically assign an initial value of 0 (for numeric variables) or a null character (for character variables); the initial value of a static variable is 0.
4. When a function is called multiple times and the values of certain variables are required to be retained between calls, static local variables can be considered. Although global variables can also be used to achieve the above purpose, global variables sometimes cause unexpected side effects, so it is still better to use local static variables.
About static global variables:
So static global variables are not used much.