C language keyword keyword summary

Treemap overview

Insert picture description here

Operator

Insert picture description here

The difference of sizeof strlen The
Insert picture description here
specific and detailed difference stamp here is the difference of sizeof strlen

Data type keywords

Data types are char int float enum short and long unsigned signed
Insert picture description here

Language storage type keywords

auto————The invisible assassin

auto as an automatic variable So what is an automatic variable? Automatic variables are local variables . They are destroyed when they go out of the scope of the function. All unmodified local variables in the C language use auto but auto can be omitted.

static——————The powerful giant

static function :

  1. Indicate the attribute of the variable "static", and the variable is stored in the static area.
  2. Also has the meaning of "scope qualifier"

note

  1. The scope of static modified global variables is only in the declared file
  2. The scope of the static modified function is only in the declared file

register————register variable

Register function: register indicates that the variable will be stored in the register.
Note:

  1. Just register request register variables, and not necessarily successful
  2. The register variable must be a value acceptable to the cpu register
  3. Cannot use the & operator to get the address of the register variable
  4. This usually means that the register variable must be a single value, and the length should be less than or equal to the length of the integer (part of the floating point can be stored)

summary

  1. The auto variable is stored in the program stack area and is the default attribute
  2. Static variables are stored in the static area of ​​the program
  3. The register variable request is stored in the cpu register

Declaration definition

typedef

Define the type use typedef to
define the constant use define

Guess you like

Origin blog.csdn.net/qq_45849625/article/details/113439416