There are 32 keywords in C language. According to the function of keywords, they can be divided into four categories: data type keywords, control statement keywords, storage type keywords and other keywords. .
auto: The compiler defaults to auto when declaring automatic variables
int: Declare integer variables
double: Declare double precision variables
long: Declare long integer variable
char: Declare character variable
float: Declare floating point variable
short: Declare short integer variable
signed: Declare signed type variables
unsigned: Declare unsigned type variables
struct: Declare structure variables
union: Declare union (union data) variables
enum: declare enumeration variables
static: declare static variables
switch: used for switch statements
case: branch of switch statements
default : The "default" branch in the switch statement
break: Jump out of the current loop
register: Declare a register variable
const: Declare a read-only variable (constant variable)
volatile: Indicates that variables may be implicitly changed during program execution
typedef: alias the data type
extern: declares that variables are referenced from other files
return: subroutine return statement (parameters are optional)
void: declare that the function has no return value or no parameters, declare a null type pointer
continue: end the current loop And start the next cycle
do: the loop body of the loop statement
while: the loop condition of the loop statement
if: conditional statement
else: Negative branch of conditional statement
for: loop statement
goto: unconditional jump statement
sizeof: Calculate the size of the memory space occupied by the object
Recommended: "c Language Tutorial"
The above is the detailed content of What are the keywords in C language?. For more information, please follow other related articles on the PHP Chinese website!