Storage of Basic Types

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Storage of Basic Types on docs.microsoft.com. 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: