
100 C++ Declarations
4.2 TOKENS
The smallest individual unit in a program is
known as ‘token’. C++ programs contain vari-
ous components. The compiler identifies them as
tokens. Tokens are classified into the following
types and are also indicated in Figure 4.1.
(1) Keywords – Reserved by the compiler.
(2) Identifiers – Names of variables, arrays,
classes, functions, etc. are identifiers.
(3) Constants – Constants are fixed values.
(4) Operators – Operators are different types and
are used in expressions.
(5) String – Sequence of characters.
The keywords are reserved set of words with fixed meanings. The variables are used to ...