Answer: Keywords are reserved words that have a fixed, predefined meaning for the C compiler. They cannot be used as identifiers (variable, function or array names). ANSI C has 32 keywords, all written in lowercase.
| 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 |
Groups:
- Data types: char, int, float, double, void, short, long, signed, unsigned
- Control: if, else, switch, case, default, for, while, do, break, continue, goto, return
- Storage classes: auto, register, static, extern
- User-defined types and others: struct, union, enum, typedef, const, volatile, sizeof
Example: int float; is an error because float is a keyword, but int total; is valid.