Storage of Basic Types
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Storage of Basic Types

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

Sizes of Fundamental Types

Type Storage
char, unsigned char, signed char 1 byte
short, unsigned short 2 bytes
int, unsigned int 4 bytes
long, unsigned long 4 bytes
float 4 bytes
double 8 bytes
long double 8 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.

© 2016 Microsoft