Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What do 32 keywords in C language mean?
What do 32 keywords in C language mean?
C language keywords (also known as reserved words) are word symbols with fixed meanings specified in the programming language. (32)

)

In other words, you can't rename a variable when you define it. See the first section for details:

According to the function of keywords, keywords can be divided into two categories: data type keywords and process control keywords.

1 data type keyword

Basic data type (5)

Void: Declare that the function has no return value or no parameters, declare that there is no type pointer, and explicitly discard the operation result.

Char: data of character type, which is an integer data.

Int: Integer data, usually the machine word length specified by the compiler.

Float: Single-precision floating-point data, which belongs to a kind of floating-point data.

Double: double-precision floating-point data, which belongs to a kind of floating-point data.

Type b modifier keyword (4)

Short: decorated int, short integer data, decorated int can be omitted.

Long: decorated int, long integer data, decorated int can be omitted.

Signed: modifies integer data and has a signed data type.

Unsigned: decorated integer data, unsigned data type.

C complex type keywords (5)

Structure: structure declaration

Joint: * * Declared in the aspect.

Enumeration: Enumeration declaration

Typedef: declare type alias

Sizeof: Get the size of a specific type or variable of a specific type.

D storage level keywords (6)

Auto: designated as an automatic variable, which is automatically allocated and released by the compiler. Usually allocated on the stack.

Static: designated as a static variable, distributed in the static variable area. When decorating a function, the scope of the function is specified as inside the file.

Register: Specify as a register variable. It is suggested that the compiler store variables in registers for use or modify function parameters. It is recommended that the compiler pass parameters through registers instead of the stack.

Extern: specifies that the corresponding variable is an external variable, that is, it is defined in another target file, which can be considered as agreeing to declare it in another file. Men?

Const: collectively referred to as "cv feature" with volatile, the specified variable cannot be changed by the current thread/process (but can be changed by the system or other threads/processes).

Volatile: collectively referred to as "cv feature" with const, the value of the specified variable may be changed by the system or other processes/threads, forcing the compiler to get the value of the variable from memory every time.

2 process control keywords

A jump structure (4 blocks)

Return: used in the function body to return a specific value (or void value, that is, no return value).

Continue: End the current cycle and start the next cycle.

Break: jump out of the current cycle or switch structure

Goto: unconditional jump statement

B branch structure (5)

If: conditional statement

Else: Negative branch of conditional statement (used with if)

Switch: switch statement (multi-branch statement)

Case: branch tag in switch statement

Default: Divide and Concurrent "Other" in the switch statement, optional.

Circulating structure (3)

For: For circular structure, for (1; 2; 3)4; The execution order of is1-> 2->; 4->; 3->; 2 ... cycle, where 2 is the cycle condition.

Do: Do loop structure, do1while (2); The execution order of is1->; 2->; 1 ... loop, and 2 is the loop condition.

While :while loop structure, while (1) 2; The execution order of is1->; 2->; 1 ... cycle, 1 is the cycle condition.

In the above loop statement, if the loop condition expression is true, continue the loop, if false, jump out of the loop.