Crossware

Table of Contents        Previous topic       Next topic       

C/C++ COMPILER->C Language Definition->Data Sizes

The data sizes for the C compiler are given in the following table.  Signed is the default type but may be explicitly declared for all data sizes using the signed keyword.

(1 byte is 8 bits)

    
TypeStorage Size
    
char1 byte
short int 2 bytes
long int  4 bytes
int4 bytes
long long int8 bytes
unsigned char1 byte
unsigned short int2 bytes
unsigned long int 4 bytes
unsigned int4 bytes
unsigned long long int8 bytes
float4 bytes
double8 bytes
long double8 bytes

Integer types are stored most significant byte first.
Floating point types are stored internally in IEEE 754 format.

Bitfields are stored starting from the most significant bit of the memory location.