Data Types | Meaning | Size(in bytes) |
---|---|---|
int | Integer(int a =5;) | 2 or 4 |
float | Floating point(float a=5.3;) | 4 |
double | Double Floating Point(doube distance=45E12) | 8 |
char | Character (char test='h') | 1 |
wchar_t | wide Character (for storing character of size>1byte) | 2 |
bool | Boolean (bool condition=false;) | 1 |
void | Empty (indicates absence of data) | 0 |
The values it can take depends upon the modifier, (signed or unsigned)
Singed data types stores values from -\(2^{size-1}\) to \(2^{size-1}-1\)
for unsigned data type, the varable can store from 0 to -\(2^{size} -1\)
We can further modify some fundamental data types by using Data modifiers.