Well, reading \"a bit old\" book (\"The C programming language\", second edition, by Dennis Ritchie), I came a cross the following:
An external variab
extern int max
inside main
or function is saying to the compiler "I am not a local variable inside the main or function, I am the global variable defined elsewhere".
If the global is declared in the same file, not useful. In different file,yes, but not in each function, just declare one time in the head file of the source that use this global variable. This is the same in c++
.