An identifier is a sequence of letters and digits. Identifiers are created to give unique name to C entities to identify it during the execution of program. It means names given to various program elements, such as variables, function, etc..,
Rules for naming an Identifier
- The first character must be "_" ( underscore ) or any alphabet character.
Ex: abc_, a_bc, a1bc, A1_bc
- We can use both upper and lower case but upper case character is not equal to lower case character.
Ex: abc is not equal to ABC
- Keyword, special symbols and space are not allowed.
EX: $abc, 1abc, a bc
- An identifier can be of any length while most of the C compiler recognizes only the first 31 characters.