Question: what is the difference between static local and static global variables?
Answer: A local static variable is a variable that can maintain its value from one function call to another and it will exist until the program ends. When a local static variable is created, it should be assigned an initial value. ... A global static variable is one that can only be accessed in the file where it is created.