Tokens in C++
Tokens
Type of tokens are as follow:
1. Keyword
2. Identifiers & Constants
Rules of identifiers
Type of tokens are as follow:
- Keyword
- Identifiers
- Constant
- Strings
- Operators
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