(1) The following is a static global variable and a global variable example, but actually this is the same as the local variable principle
The global variable declaration is preceded by a static global variable. Both global variables and static global variables are stored statically, and there is no difference in storage. The difference is in their scope, the scope of the global variable is the whole source program, when the source program has multiple source files, the global variables are valid in each source program file, and the static global variable is limited scope, only in the source file that defines the variable is useful in the same program of other source files can not be used!
There are static global variables that are initialized only once to prevent calls in other source files! and global variables can be initialized with other source files!!
(2) So my understanding is static only in their own current file can be used, but for other files although they are in a project, but this variable can not be used, note that static variables can only be declared once,
However, a declared or defined dynamic variable can be used in any file under the same project.
For static variables and dynamic variables