Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does static int c=3 mean?
What does static int c=3 mean?

static is a static modifier

int integer modifier

The whole means a static integer variable C, with an initial value of 3

. Define an integer variable, and the stored data is 3. This variable is a global variable, which means that the whole program can be used, and the space it occupies will not be released before the end of the program.

Extended data:

The type specifier is int, accounting for 4 bytes in the memory (there may be differences between different systems, here it was originally 2, and it was verified that it was 4 in windows system, and so was VAX system), and its value is a basic integer constant.

one variable name of integer type or multiple variable names separated by commas

Similarly, variables of unsigned int and unsigned long type can be defined.

Defining a variable means allocating a storage space with a corresponding size to the variable in memory, and at the same time determining the storage mode and possible operations of the variable value.

Baidu encyclopedia-integer variable