Storage of Basic Types

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Storage of Basic Types.

The following table summarizes the storage associated with each basic type.

Sizes of Fundamental Types

TypeStorage
char, unsigned char, signed char1 byte
short, unsigned short2 bytes
int, unsigned int4 bytes
long, unsigned long4 bytes
float4 bytes
double8 bytes
long double8 bytes

The C data types fall into general categories. The "integral types" include char, int, short, long, signed, unsigned, and enum. The "floating types" include float, double, and long double. The "arithmetic types" include all floating and integral types.

Declarations and Types

Show: