Mega Code Archive

 
Categories / C Tutorial / Data Type
 

Integer data type storage allocations

Data Type Allocation Range signed char1 byte-2^7 to 2^7-1(-128 to 127) Unsigned char1 byte0 to 2^8-1(0 to 255) short2 bytes-2^15 to 2^15 -1 (-32768 to 32767) Unsigned short2 bytes0 to 216 -1 (0 to 65535) long int4 bytes2^31 to 2^31-1 (2,147,483,648 to 2,147,483,647) int2 or 4 bytes depending on implementation