What does extern mean in C language?
This article mainly explains "what is the meaning of extern in c language". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the meaning of extern in c language"?
1. If a variable uses the keyword extern and the variable is declared as an external variable, it means that the variable is a defined external variable. With this declaration, you can start with the declaration and legally use external variables.
2. Extern modifies variable declaration and function declaration.
Example
/ * file1.c * / int x = 10 printf func1 (); / * file2.c * / extern int x; / / this variable is already defined externally, here there is only a declaration extern int func1 (); / / the function is already externally defined, here only a declaration int main (void) {printf ("x =% d", x); / / x = 10 int (); return 0 } at this point, I believe you have a deeper understanding of "what is the meaning of extern in c language". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!