Identifiers:-
The Identifiers are the names used to represent Variable, constant, types, functions and label in the program. Identifier is an important feature of all computer languages. A good identifier name should be descriptive but short.
An identifier in C++ may consist of 31 character will be used. The remaining character will be ignored by C++ compiler. Some important rules for identifier name are as follows:
1. The first character must be an alphabetic or underscore ( ).
2. The identifier name must consist of only alphabetical characters, digits or underscores.
3. The reserved word cannot be used as identifier name.
Types Of Identifiers:-
C++ provides the following types of identifiers:• Standard Identifiers
• User-defined identifiers
Standard Identifiers:-
A type of Identifier that has special meaning in C++ is Known as standard identifiers.
Example:-
Cout and cin are example of standard identifiers. These are the names of input/output object defined in standard input/output library iostream.hUser-defined Identifiers:-
The Type of identifiers that is defined by the programmer to acess memory location is known as user-defined identifier. is use to store data
Example:-
Some examples of user-defined identifiers are a, marks and age etc.
No comments:
Post a Comment
Thanks for comment