Identifiers
Identifers are the names given to a program elements such as variables , arrays, and functions. Identifiers must be unique. They are created to give unique names to a entity to identify it during the execute of the program . Identifiers names must be different from keywords . You cannot use int as an identifiers because int is a keyword.
Rules of Identifiers
- It can not have special character except the underscore "_".
- It can not be a keyword.
- It can not have spaces in between.
- It must begin with a alphabates or an underscore.
- C is also a case sensitive language so here "Class" & "class" both are different.
- It can not certain more then 31 characters.
Example of valid identifiers
total, sum, average, _m _, sum_1, etc.
Example of invalid identifiers
2sum (starts with a numerical digit)
int (reserved word)
char (reserved word)
m+n (special character, i.e., '+')
0 Comments