Home / Computer Courses / Data Types in C++ language [Built-in vs User defined Data Types]

Data Types in C++ language [Built-in vs User defined Data Types]

Data Types in C++ language [Built-in vs User defined Data Types] | MyFSTech.com

Basically we have number of data type in which we have some data type that are user defined and some of them are built in data type.

we have 3 types of data type that are:

i) Built-in Data type   ii) User Defined   iii) Derived Type

Data Types in C++ language [Built-in vs User defined Data Types]

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

So first of all lets talk about what are Built in  Data Type!!!!

i) Built-in Data Types:

Built in data type are those which are defined in or comes with the language itself. Means the programmer does not re define them and use them as it is for their purposes. these are already defined in the language.

For Example:

  1. Integer Data Type
  2. Float Data Type

Further if we divide them then we have their sub categories of integers and floats. Those are:

Integer will have int, unsigned int, short,  byte, long, signed char. Similarly the float will have float and double.

ii) User Defined Types:

user defined are those data type that are basically defined by the programmer for their own purposes. Means they are defined by the programmers.

For Example:

Structure, Means which is define by the keyword struct. union, class (contains data types and methods), Enumeration (a custom data types used to store user values).

iii) Derived Type

These are the data types which can be defined to store larger values means we can say when we have to store series of data (not single data) but the data of large number of students then we can use derived data types.

For Example:

Array can be used to store sequence of data of single data type such as array of integer or array of float.

Functions can be used to do different operations.

pointers can be used to store the address of variables.

reference types can be used to refer to any object in memory.

 

Note: you can contact us on our Facebook group in case of error or query.

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 *