Question: what is the difference between static local variable and global variable?
Answer: Global vs Static Variables. Global variables are variables defined outside of any function. ... Static global variables are private to the source file where they are defined and do not conflict with other variables in other source files which would have the same name.