Identifier in
C++
{tocify} $title={Table of Contents}
The following rules are common to both C and C++:-
·
Only alphabetic character, digit and underscore are
permitted.
·
The name cannot start with digit.
·
Uppercase and lowercase letter are distinct.
·
A declare keyword cannot be used as a variable name.
C++ does not allow punctuation characters such
as @, $, and % within identifiers. C++ is a case-sensitive programming
language. Thus, Manpower and manpower are two
different identifiers in C++.
Here are some examples of acceptable identifiers in C++:−
simple neeraj xyz
move_name x_123 name10 _temp
m a2cb
rasJav |