Keywords and Identifiers in C Programming
Keywords
C has a set of reserved keywords. They have a basic meaning behind them. They are written in lower case. In all there are 32 keywords.
Following table provides with all the keywords:
auto | break | case | char |
const | continue | default | double |
else | enum | extern | float |
for | goto | int | long |
register | return | short | signed |
sizeof | struct | switch | typedef |
union | unsigned | void | volatile |
do | if | static | while |
Identifiers
Identifiers are the names given to the variables, constants, functions and the user-defined data.
Identifiers are written by keeping in mind a set of rules.
The rules are as follows:
1. Special characters or punctuation marks like #, $, ^,?, . etc cannot be included. But an '_' underscore can be used.
2. Two successive underscores cannot be used at the same time.
3. Any keywords cannot be used as an identifier.
4. Identifiers are case-sensitive.
5. The identifier name can begin with an alphabet or an underscore.
6. An identifier can be of any reasonable length, but it should not contain more than 31 characters.