Complete List of 32 Keywords in C Language
The C language contains a total of 32 keywords.
These are reserved words that have special meaning in a program.
Understanding these keywords makes learning programming much easier.
Important Points About Keywords
- Keywords are reserved words: They cannot be used as variable names.
- Case-sensitive: int, Int, and INT are different.
- Control flow keywords: if, else, switch, for, while, do, break, continue, goto.
- Data type keywords: int, float, double, char, void, long, short, signed, unsigned.
- Storage class keywords: auto, static, extern, register.
- Special keywords: sizeof, typedef, volatile, return.
List of Keywords in C Language
| Keyword | Meaning / Purpose |
|---|---|
| auto | Automatic storage class |
| break | Used to exit from a loop or switch statement |
| case | Used for branching in switch statement |
| char | Used to declare a character data type |
| const | Used to declare a constant (fixed value) |
| continue | Skips the remaining part of the current loop iteration |
| default | Default branch in switch statement |
| do | Used in do-while loop |
| double | Used to declare double-precision floating-point data type |
| else | Alternative block of if statement |
| enum | Used to declare enumeration type |
| extern | Used to declare global variables |
| float | Used to declare floating-point data type |
| for | Used to create loop structure |
| goto | Used to jump to a labeled statement |
| if | Used to write decision-making statements |
| int | Used to declare integer data type |
| long | Used to declare long integer data type |
| register | Used to store variable in CPU register |
| return | Used to return a value from a function |
| short | Used to declare short integer data type |
| signed | Used to declare signed data type modifier |
| sizeof | Used to find the size of a data type or variable |
| static | Static storage class |
| struct | Used to declare a structure |
| switch | Used to create multi-way branching statements |
| typedef | Used to define a new data type name |
| union | Used to declare union for shared memory storage |
| unsigned | Used to declare unsigned data type modifier |
| void | Specifies no return value or empty type |
| volatile | Prevents compiler from optimizing a variable |
| while | Used to create a loop statement |