In this tutorial, we will learn about C++ identifiers. A C++ identifier is a name used to identify a variable, class, function, or other user-defined items in the program.
The rules of the C++ language determine the valid identifiers. There are some rules for valid or qualified identifiers.
The first character of an identifier must be alphabetic[A to Z or a to z] or an underscore(_). The first character cannot be a numeric digit(0 to 9).
Note that C++ is a case-sensitive programming language. For example, studentNo and STUDENTNO are two different identifiers in C++.
C++ reserved words cannot be used for identifiers. For example, throw is a reserved word. We cannot have an identifier with this name.
Some valid and legal identifiers are as follows:
Some unqualified identifiers are as follows:
C++ Tutorials on this website:
For more information on the current ISO C++ standard