C++ Tokens - Devbhoomi

FREE JOB ALERT & ONLINE TUTORIALS

Hot

Post Top Ad

Saturday 7 October 2017

C++ Tokens

C++ Tokens




As mentioned earlier, C++ is the superset of C and so most constructs of C are legal in C++ with their meaning and usage unchanged. So tokens, expressions and data types are similar like that of C. It also is preferred to understand the concepts of C before learning C++. However there are some exceptions and additions in C++ which you will not get in C. In this chapter you will learn about what are tokens, and the different types of tokens, expressions, and basic data types.
Each individual word and punctuation is referred to as a token in C++. Tokens are the smallest building block or smallest unit of a C++ program.
These following tokens are available in C++:
  • Identifiers
  • Keywords
  • Constants
  • Operators
  • Strings
Identifiers: Identifiers are names given to different entries such as variables, structures and functions. Also identifier names should have to be unique because these entities are used in the execution of the program.
Keywords: Keywords is reserved words which have fixed meaning and its meaning cannot be changed. The meaning and working of these keywords are already known to the compiler. C++ has more numbers of keyword than C and those extra ones have special working capabilities.
Operators: C++ operator is a symbol that is used to perform mathematical or logical manipulations.
Constants: Constants are like variable, except that their value never changes during execution once defined.
Strings: Strings are objects that signify sequences of characters.

No comments:

Post a Comment

Post Top Ad