C Tokens
C Tokens
4 C TOKENS
The next step after the definition of the character set is the formation of words,
keywords etc. The smallest individual units in a C program are called tokens. The
alphabets, numbers and special symbols are combined to forms these tokens. The
types of tokens in C are :
- Keywords
- Identifiers
- Constants
- Strings
- Special Symbols
- Operators
We shall study each of these tokens in detail.
Identifiers :
Identifiers are names given to variables, functions and arrays. These are the
names which are user defined. They are made up by a combination of letters and
digits. Normally an identifier should not be more than 8 characters long. The use of
underscore is also permitted in identifiers. However, it is imperative that identifiers
should begin with a letter.
Some examples of identifiers are : min1
Max-temp
temp() etc.
C does not permit use of blank spaces, tabs, commas or special characters in
identifiers. Thus:
mi n1
max*temp
12temp
are invalid identifiers in C.
Beginning with C / 23