You can add attribute keywords when defining variables.
1) Auto
Auto is the default property of the local variable in the C language.
Auto indicates that the modified variable is stored on the stack
The compiler defaults to all local variables that are auto
2) Register
The 1.register keyword indicates that local variables are stored in registers
2.register is just a request register variable, but not necessarily successful
The 3.register variable must be a value acceptable to the CPU register
4. The address of the register variable cannot be obtained with & (because the,& is the address in memory, and the register variable is stored in the register, of course you cannot use & to get the address of the register variable)
3) static
The 1.static keyword indicates the "static" property of the variable
Local variables----Static modifications are stored in the program static area
2.static Key has the meaning of "scope qualifier" at the same time
The scope of the global variable----The static adornment is only declared in the file
----The function scope of the static modifier is only in the declared file
4) extern
1.extern variables and functions for declaring "external" definitions
----extern variable to allocate space elsewhere in the file
----the extern function is defined elsewhere in the file
2.extern is used to "tell" compilers to compile using C
The C + + compiler and some other C compilers are different because of the developers, the different compilers will compile the functions and variables in their own way, but after the extern, they must follow the "standard C way to compile the program"
This article from "Van Gogh said my brain is sick" blog, declined reprint!
Variable properties of C language