what are Identifier in c++ language? programming in c++

 Chapter No 2


Programming in c++


 what are Identifier in c++ language?

                                    Identifier are names that is represent as variable,constants,functions and labels in the program. 

Identifier is importance feature of all programming language.

Identifier in c++ may consist of 31 characters.

If name of identifier is more than 31 characters first 31 character can be used remaining is ignore.

Some important rules for identifiers as follows 

  • The first character must be an aliphatic or underscore(_)
  • The reserved words cannot be used as identifiers 


Types of Identifiers👈The are two type of identifiers

 
  •  Standard Identifiers
  •  User Defined Identifiers


Standard Identifiers is type of identifiers that having special meaning in the c++ language is called standard identifier.

Cin  and cout  are example of standard identifiers in c++ language. Cin  and cout both are name of output and input objects defined in library iostream.h




User defined identifier that is  defined by the programmer's to access the memory location.

User defined identifier is used for storing a data and program result.

a,marks,age are example of  User defined identifier.



Data Types in c++

                    There are four Data Types in c++.
(1)    Int           (Its used for stored the numeric values) 
(2)    float         (It is store to real values)
(3)    double      ( It is store to large real values)  
(4)    char         (It is used to store a characters)



Comments in c++ language

There are two types of comments in c++ language.

(1) single line comments 
(2) Double line comments







Comments