The unique names used in the program to represent the variables, constants, functions and labels etc. are called Identifiers. You can use any number of characters for the name of an identifier but only the first 31 characters are significant to the C compiler.
There are two types of identifiers in C. These are:
- Standard Identifier
- User-Defined Identifier
In C-language, a source program consists of keywords, variables (or identifiers), constants, operators, punctuators etc. These elements of a program known as tokens.
main()
{
float temp, xy4;
xy4 = 10;
temp = xy4 + 10 * 2;
}
In the above program;
- ''main'' is a special identifier and temp, xy4 are variables.
- ''float'' is a keyword.
- The punctuators are; { , " , '' , ( , ) , ; , white spaces etc.
- The operators are : , = , * , + , etc.
The predefined words of the C-language that are used for special purposes in the source program are called keywords. Keywords are also known as reserved words.
keyword "int" is used to define the integer type variables.
Each keyword has certain meanings in C language. They cannot be redefined or used in other ways. They cannot be used as variable or function names. Keywords are always written in lowercase's. There are 32 keywords in C.
The ''main'' is not the keyword. It is a special identifier that indicates the beginning of the program.