Question: what is the difference between static variable and global variable in c?
Answer: A static variable is only visible in the source file or {} block it is declared in, but exists and holds its value for the life of the program in global memory. A global variable is the same but visible anywhere.