關(guān)鍵字也叫保留字,在編寫程序時(shí)不能將關(guān)鍵字用作變量名稱,常數(shù)名稱等。C語(yǔ)言中只有32個(gè)保留字(關(guān)鍵字)。
c語(yǔ)言中的32個(gè)關(guān)鍵字列表如下:
| auto | break | case | char | const | continue | default | do |
|---|---|---|---|---|---|---|---|
| double | else | enum | extern | float | for | goto | if |
| int | long | register | return | short | signed | sizeof | static |
| struct | switch | typedef | union | unsigned | void | volatile | while |
稍后我們將了解所有C語(yǔ)言關(guān)鍵詞。