就是不能用作标志词的
由ANSI标准定义的C语言关键字共32个 :
auto double int struct break else long switch
case enum register typedef char extern return union
const float short unsigned continue for signed void
default goto sizeof volatile do if while static
#include<stdio.h> int main() { prntf("慕课,你好,晚安,明天见\n”); teturn0; }
#include<stdio.h>
int main()
{
prntf("慕课,你好,晚安,明天见\n”);
teturn0;
}
break | case | char | const | continue | do | ||
double | else | enum | extern | for | goto | if | |
int | long | register | return | short | signed | sizeof | static |
struct | switch | typedef | union | unsigned | volatile |
1999年12月16日,ISO推出了C99标准,该标准新增了5个C语言关键字:
inline | restrict | _Bool | _Complex | _Imaginary |
2011年12月8日,ISO发布C语言的新标准C11,该标准新增了7个C语言关键字:
_Alignas | _Alignof | _Atomic | _Static_assert | _Noreturn | _Thread_local | _Generic |
auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if while static