C Reserved Words
C Reserved Words
In this tutorial, we will learn about C Reserved words or keywords. C keywords are predefined words that are already defined and have special meanings.
C Reserved Words
C Keywords are words that are part of the C Language. These words have predefined meanings and these words cannot be used as variable names in the C Program.
C Keywords |
|||
char | signed | break | for |
auto | const | sizeof | case |
if | extern | double | struct |
continue | goto | register | enum |
typedef | default | return | static |
float | union | do | switch |
volatile | int | unsigned | else |
while | long | void | short |
The IDE software like Code::Blocks IDE highlights the C keywords with a different color. This is to increase the readability of the source code.
Example
In this example, the programmer is trying to declare and create a variable with the variable name case. However, the case is a C keyword. We cannot have the keyword as the variable name. The compiler throws an error expected identifier. The C compiler expects a valid identifier name.
Notice that the C keywords int, case, and return words are highlighted with dark blue color in the example.
—
C Tutorials
C Tutorials on this website can be found at: