Identifiers in C++ Language:
(1) In C++ Language, Identifiers are nothing but variables. It is recommended to define variable names as unique and more descriptive. Like
- int myInt → myInt is Identifier
- double myDouble → myDouble is Identifier
- char myChar → myChar is Identifier.
- stringmyString → myString is Identifier
- bool myBool → myBool is identifier
(2) Rules for defining Identifiers.
- Identifiers can contain letters, numeric and underscore.
- Identifiers are case sensitive.
- Identifiers cannot contain space or special characters like !, @, $,^ ,* etc.
- Identifiers must begin with Letter or Underscore.
(3) Example as shown.