C++ data type is an inbuilt keyword that defines the type of a variable. For example, in C++ if we want to declare an integer type data type, then we have to write _int number; _However, there are three types of Data Type in C++.
All variables use the data-type during declaration to restrict a specific type of data to be stored. Therefore, we can say that the data types are used to tell the variables a particular type of data it can store.
Whenever the variable is defined in C++, the compiler allocates some memory for that variable based on a data type with which it is declared. Every data type requires a different amount of memory.
See the following figure.
Now, we will learn about these three types of data types in detail.
#c++ #c++ data type