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
Before Going Next, We Have Some Recommended for you!!!
- Use of Keywords in C++ Language
- Types of Identifiers with Examples in C/C++ Language
- Errors and Types of Errors in C++ Language
- Basic Structure of C++ Program
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.
- Integer Data Type
- 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.
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.
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.