C++ Identifiers

C++ Identifiers


C++ Identifiers

An Identifier is an unique name which is used to identify the variables, functions, arrays, or other user-defined data types created by the programmer.

Here is an example of acceptable identifiers –

Valid Identifiers:

The following are the examples of valid identifiers are:

In valid an identifier starts with a letter A to Z or a to z or an underscore (_) .

Example for

  • money
  • accountBalance
  • custumerId
  • _Difference
  • Invalid Identifiers:

Invalid which is that starts with special character and numeric value and so on example shown in below:

  • Multiplication-1   // containing special character '-'.  
  • 56Id   // the first letter is a digit.