Internal linkage with static keyword in C
I know static is an overloaded keyword in C. Here, I'm only interested in its use as a keyword to enforce internal linkage. If you have a global variable declared in a .c file, what is the difference between using static and not using static ? Either way, no other .c file has access to the variable, so the variable is basically "private" to the file, with or without the static keyword. For example, if I have a file foo.c , and I declare a global variable: int x = 5; That variable x is only available to code inside foo.c (unless of course I declare it in some shared header file with the extern