The smallest individual unit in a program is
known as token or a lexical unit.
C++ has the following tokens:-
Keywords
Keywords are the words that convey a
special meaning to the language compiler. These are reserved for special
purpose and must not be used as normal identifier names
Identifiers
An identifier is an arbitrarily long
sequence of letters and digits. The first Characters must be
A letter
The underscore ( _ ) counts as a letter.
Some valid identifiers are
Myfile
DATE9_7_77
Z2T0Z9
Literals
Literals are data items that never change
their values during a program run. C++ have several kind of literals
Integer-Constant
Floating –Constant
Character-Constant
String-Literals
Operators
Operators are tokens that trigger some
computation when applied to variables and other objects in an expressions.
Following are some of the Operators
&= Address operator
*= Indirection Operator
+= Unary Plus
-=Unary Minus
_= Bitwise Complement
++= Increment operator
--= Decrement operator
!= Logical negation