The names given to constants, variables, functions and user-define data are known as Identifiers. It is assigned by the user in the program.
There are a set of rules to frame an Identifier.
- An identifier can be of alphanumeric values only i.e letters and digits. (A-Z, a-z, 0-9)
- Underscore _ can be used in an identifier.
- Identifier names must be unique.
- Keywords cannot serve as an Identifier.
- No special character is allowed.
- The first character of an identifier must be an alphabet or underscore.
- Identifiers are case-sensitive.
- No white spaces are allowed.
Below is an example of an Identifier and keyword.
int Total; float student_percent;
Here int and float are keywords, Total and student_percent are identifier.