In post C-Langauge , we understood that a Language must have some meaningful words created using symbols.The C Language also have some meaningful words ( also called keywords ).
Here’s a list of the standard C keywords categorised based on their usage :
Storage/Memory related keywords.
| Keywords | Usage / Purpose |
| register | It suggests compiler to store variable in a CPU register. |
| auto | It declares automatic variables (default storage class). |
| static | It is used to declares a static variable. |
| extern | It declares that a variable is defined somewhere else. |
| volatile | It tells the compiler not to optimize the variable. |
Data type or size related keywords
| Keywords | Usage / Purpose |
| char | It declares a character variable. |
| short | It declares a short integer variable. |
| int | It declares an integer variable. |
| long | It declares a long integer variable. |
| long long | It declares a long long integer variable. |
| float | It declares a floating-point variable. |
| double | It declares a double-precision floating-point variable. |
| struct | It declares a structure. |
| union | It declares a union. |
| typedef | It is used to creates a new type name. |
| enum | It declares an enumeration. |
| sizeof | It returns the size of a data type or a variable. |
| void | It is used specifies no return value or no parameters. |
| unsigned | It declares an unsigned variable. |
| signed | It declares a signed variable. |
| const | It is used to declares a constant value / Variable. |
Loop related keywords
| Keywords | Usage / Purpose |
| while | It is used to starts a while loop. |
| do | It is used to starts a do-while loop. |
| for | It is used to starts a for loop. |
| continue | It is used to skips the current iteration of a loop. |
| break | It is used to exits from a loop or switch statement. |
Conditions related keywords
| Keywords | Usage / Purpose |
| if | It starts a conditional statement. |
| else | It specifies the default path in an if statement. |
| else if | Specifies the alternative path in an if statement |
| switch | It starts a switch-case block. |
| case | It is used to defines a case in a switch statement. |
| default | It will specifie the default case in a switch statement.. |
Others
| Keywords | Usage / Purpose |
| goto | It transfers control to a labeled statement. |
| return | It is used to returns a value from a function. |
We will understand the usage of all these keywords in detail in comming posts. Please keep reading …! 😊
