As mentioned earlier, C++ is the superset of C, so most C constructs are legal in C++, and their meaning and usage are unchanged. So tokens, expressions, and data types are similar to C. It also is preferred to understand the concepts of C before learning C++. However, there are some exceptions and additions in C++ that you will not get in C. In this tutorial, you will learn what tokens are in C++.

What are Tokens

Each word and punctuation is referred to as a token in C++. Tokens are the smallest building block or smallest unit of a C++ program.

The following tokens are available in C++:


Identifiers are names given to various entries, such as variables, structures, and functions. Also, identifier names must be unique as these entities are used in program execution.


Keywords are reserved words with fixed meanings that cannot be changed. The meaning and working of these keywords are already known to the compiler. C++ has more numbers of keywords than C, and those extra ones have unique working capabilities.


C++ operator is a symbol that is used to perform mathematical or logical manipulations.


Constants are like a variable, except that their value never changes during execution once defined.


Strings are objects that signify sequences of characters.

Found This Page Useful? Share It!
Get the Latest Tutorials and Updates
Join us on Telegram