keywords and identifiers in c programming
Token:
The smallest unit in a C programming language is called a token. They are involved in the process of compilation, where a program is converted into the smallest units continuing to the stages of compilation. These smallest units converted are known as tokens. There are six different types of tokens:
- Keywords
- Operators
- Strings
- Constants
- Special Characters
- Identifiers

Keywords:
Keywords are reserved words that are assigned with a special meaning in the language. These meanings cannot be changed and hence they cannot be used as variable names if used it will result in an error at the time of compilation. They always specify the type or kind of entity. There are a total of 32 keywords in the C language.
List of keywords:
auto | double | int | struct |
break | else | long | switch |
case | enum | typedef | register |
const | extern | return | union |
char | float | short | unsigned |
continue | for | signed | volatile |
default | goto | void | sizeof |
do | if | static | while |
These were the list of keywords available in C, they must all be written in lowercase.
Identifiers:
In C language identifiers are the names assigned to the elements in the programs such as the variables, functions, constants, user-defined data types etc. As the name specifies, identifiers are used to identify the precise elements of the program. The name of the identifiers should be unique, following the rules below.
Rules:
- Should only contain alphanumeric characters (a-z, A-Z, 0-9) and underscore (_).
- The first character of an identifier should start with an alphabet (A-Z, a-z) or underscore (_).
- They are case sensitive.
- Keywords cannot be used to name identifiers.
- There should be no whitespace between characters while naming identifiers.
- Use of special characters are prohibited.
Difference between keywords and identifiers:

Tabular difference:
Keywords | Identifiers |
Keywords are predefined words. | Identifiers are values used to define program elements. |
It always starts with a lowercase character. | It can start with lowercase, uppercase or underscore. |
Specify type or kind of entity. | Identifies name. |
Example: char, if, while, for, etc. | Example: demo, test1, name_iq, etc. |
Character Sets:
A program is a set of instructions that consists of several characters and symbols. These various characters and symbols are present in the character set. Hence, the character set comprises of:
Numbers:
All numbers starting from 0-9
Letters:
Uppercase letters A-Z
Lowercase letters a-z
Whitespaces:
Blank space
Newline
Special character:
Comma(,) and Semi-colon(;)
Please write comments or WhatsApp if you find anything incorrect, or you want to share more information about the topic discussed above.