Home / Computer Courses / Types of Identifiers with Examples in C/C++ Language

Types of Identifiers with Examples in C/C++ Language

What is Identifier, Types of Identifiers in C/C++ Language | MyFSTech.com

The identifiers are the names that use to represent variable, constants, functions, types and labels in the program. It is the most important feature in programming. Because we use lot of identifiers during Programming. Good practice is that Identifiers should be descriptive and short.

Identifiers may consist of 31 Characters. suppose if the characters of the identifiers are more than 31 characters then the first 31 characters will be used. The remaining characters will be ignored by the C++ compiler.

Types of Identifiers with Examples in C/C++ Language

Before Going Next, We Have Some Recommended for you!!!

Rules for the Identifiers Name:

some important rules for the types of identifier are:

1) The first character must be an Alphabetic or underscore ( _ ).

2) name must be consist of only Alphabetic characters, underscores or digits.

3) Reserved words can not be used as its names.

 

Types of identifiers

It has different types that explaine below in detail.

1) Standard Types of identifiers:

Standard types of identifiers are the identifiers that has some special meaning in c++. The C++ language can not use Them for their original purpose if they are re-defined.

For Example:

Cout And Cin which used in c++ language for input or for print something on the computer screen. Both definition in iostream.h which is a header file.

2) User defined identifiers:

These are the types of identifiers that basically defined by the Programmer for his/her own purposes. These use to access memory locations that’s why these called user defined identifiers. These identifiers basically used to store data such as storing program results data etc…

Example of User defined are:

Some examples are storing the marks of some students. storing the age of students.

such as: int englishMarks=40;

 

Note:

if you are facing any issue regarding these posts, any  personal query or any type of confusion then you can ask us through comment section.

You can contact us on our Facebook group.

About Muhammad Faisal

Muhammad Faisal

Check Also

errors and types of errors

Error And Types Of Errors in C++ Language

Error And Types Of Errors in C++ Language Errors: Error in a program known as …

Leave a Reply

Your email address will not be published. Required fields are marked *