Question: what is difference between static variable and global variable?
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.