C plus plus programming
June 3, 2026 1 min read

Identifiers in C++: Naming Variables, Constants, Functions, and More

HS
HEMANT SINGH
Technical Writer & Educator

Identifiers are the name of variables, constants, functions, arrays, classes etc.

 

There are some rules to provide name to the variable, constants 

 

  1. Only alphabets, digits and underscores are allowed.
  2. int var1;
  3. int first_number;
  4. Uppercase and lowercase are different.
  5. int personAge;
  6. int PERSONAGE;
  7. Keyword defined in programming language are not permitted.
  8. int for;
  9. The name can not start with a digit.
  10. int 1var;

In this category