在C语言中,有一部分词汇比较特殊,它们不能作为标识符(如变量名)。许多关键字用于指定不同的类型,如int。若使用关键字不当,编译器会将其视为语法错误。这其中还有一些保留标识符,C语言已指定了它们的用途或使用权。保留标识符包括那些以下划线开头的标识符和标准库函数名,如printf().
ISO C关键字
auto | extern | shrot | while |
break |
float | signied | _Alignas |
case | for | sizeof | _Alignof |
char | goto | static | _Atomic |
const | if | struct | _Bool |
continue | inline | switch | _Complex |
default | int | typedef | _Generic |
do | long | union | _Imaginary |
double | register | unsigned | _Noreturn |
else | restrict | void | _Static_assert |
enum | return | volatile | _Thread_load |