Keyword
The keyword is also called a reserved word. It is a kind of identifier. The standard stipulates that it is a certain type of the compiler by default, so users cannot use it to express other things.
Standard C has 32 keywords;
One; 12 digital type keywords:
char: declare character variable or function return value type short: declare short integer variable or function int: declare integer variable or function
long: declare long integer variable or function return value type enum: declare enumeration type float: declare floating point variable or function return value type double: declare double precision floating point variable or function return value type signed: declare signed type Variable or function
unsigned: declare unsigned type variable or function Struct: declare structure type Union: declare common type
void: declare that the function has no return value or no parameters
Two; 12 control type keywords:
Loop statement for: a loop statement do: loop body of the loop statement while: loop condition of the loop statement
break jumps out of the current loop: continue: end the current loop and start the next round
Conditional statement if: conditional statement else: conditional statement negative branch (used with if) goto: unconditional jump statement
Switch statement switch: used for switch statement case: switch statement branch default switch statement "other" branch
Return statement return: Subroutine return statement
Three; storage type keywords 4:
auto // Declare automatic variable static // Declare static variable extern // Declare an external variable register // Declare register variable
Four; 4 other keywords:
const // Declare read-only variable sizeof // Operator, calculation data occupy memory typedef // Custom type volatile // Modified variable may change
5 new keywords for c99
restrict It can only be used to limit and restrict pointers, and indicates that the pointer is the only and initial way to access a data object
inline introverted function, used in C ++, it is an optimized implementation of macro definition
_Bool unsigned int type, defined as a Boolean type in c99, can only accommodate two values of 0,1
_Complex complex type_Imaginary pure imaginary type
c11 new keyword _Generic
(1) Basic types: integer int, short, long char real type (floating point) float double
Data type: (2) Construction type: structure type struct union type union enumeration type enum
(3) Pointer types: char *, int *, int **, etc.