Identifier in C++
Identifier refer to the name of variable,, function, array, classes, etc. created by the programmer. They are the fundamental requirement of any language. Each language has its own rules for naming these identifiers.
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 |
To learn more you can just click the below topics:
Tags
C plus plus