Tokens

Type of tokens are as follow:
  1. Keyword 
  2. Identifiers
  3. Constant 
  4. Strings
  5. Operators 
With the help of tokens We can write C++ codes

1. Keyword
  • Specific c++ feature.
  • They explicitly reserved identifiers & cannot use as name of the program, variables or other user-defined elements. 
  • Complete set of C++ keywords as follow:



2. Identifiers & Constants
  • Identifiers refer to the name of the variable, function, array, class etc created by the programmer.

Rules of identifiers
  • Only alphabets, digits and underscores are permitted.
  • The name cannot start with a digit.
  • Uppercase & Lowercase letters are distinct.
  • A declared keyword cannot be use as a variable name.


0 Comments