» A data type, in programming, is a classification that specifies the type of data that a variable can store.
» int, char, float, double are common data type in c++.
Types | Data Types |
Basic | Int,Char,Float,Double |
Derived | Array, Pointer,Structure,Union |
Enumeration | Enum |
Void | Void |
Size Of Data Types
Types Of Data | Memory Size | Range |
char | 1 byte | -128 to 127 |
unsigned char | 1 byte | 0 to 255 |
short | 2 byte | -32,768 to 32,767 |
int | 2 byte | -32,768 to 32,767 |
unsigned int | 2 byte | 0 to 65,535 |
short int | 2 byte | -32,768 to 32,767 |
long int | 4 byte | -2,147,483,648 to 2,147,483,647 |
float | 4 byte | |
double | 8 byte | |
long double | 10 byte |