Tuesday, 7 July 2015

DATA TYPES

DATA TYPES

Here is the complete list of fundamental DATA types in C++:
GroupType names*Notes on size / precision
Character typescharExactly one byte in size. At least 8 bits.
char16_tNot smaller than char. At least 16 bits.
char32_tNot smaller than char16_t. At least 32 bits.
wchar_tCan represent the largest supported character set.
Integer types (signed)signed charSame size as char. At least 8 bits.
signed short intNot smaller than char. At least 16 bits.
signed intNot smaller than short. At least 16 bits.
signed long intNot smaller than int. At least 32 bits.
signed long long intNot smaller than long. At least 64 bits.
Integer types (unsigned)unsigned char(same size as their signed counterparts)
unsigned short int
unsigned int
unsigned long int
unsigned long long int
Floating-point typesfloat
doublePrecision not less than float
long doublePrecision not less than double
Boolean typebool
Void typevoidno storage
Null pointerdecltype(nullptr)

                                         OR

In simple form you can remember them as follow
char = 1 byte
int   =  4 byte ( Use to store numbers )
long long = 8 byte (Use to store large numbers numbers )
float = 4 byte (Use to store numbers Having Decimal)
double = 8 byte (Use to store large numbers Having Decimal )

No comments:

Post a Comment