How do I use extern to share variables between source files?

Using extern is only of relevance when the program you’re building consists of multiple source files linked together, where some of the variables defined, for example, in source file file1.c need to be referenced in other source files, such as file2.c. It is important to understand the difference between defining a variable and declaring a variable: A variable is declared when the compiler is informed that a … Read more