Keil™, An ARM® Company

CARM User's Guide

Discontinued

Data Storage Formats

The CARM C Compiler offers a number of basic data types to use in your C programs. The following table lists these data types along with their size requirements and value ranges.

Data TypeBitsBytesAlignmentValue Range
signed char1811-128 to +127
unsigned char8110 to 255
signed short11622-32768 to +32767
unsigned short16220 to 65535
enum23244-2147483648 to +2147483647
signed int13244-2147483648 to +2147483647
unsigned int32440 to 4294967295
signed long13244-2147483648 to +2147483647
unsigned long32440 to 4294967295
signed long long16484-263 to +263-1
unsigned long long64840 to 264-1
float3244±1.175494E-38 to ±3.402823E+38
double6484±1.7-308 to ±1.7E+308
pointer324432-bit Address

Note

  1. Signed types are stored in two's complement.
  2. The enum type is stored using the shortest signed or unsigned integer type required to contain its value.

Other data types, like structures and unions, may contain scalars from this table.

Related Knowledgebase Articles