数据类型和数值范围

x86
数据类型 类型标示符  字节 数值范围
整形   [signed] int 4 -2147483648~+2147483647
无符号整形 unsigned int 4 0~4294967295
短整型 short [int] 2 -32768~+32767
无符号短整型 unsigned short [int] 2 0~65535
长整形 long [int] 4 -2147483648~+2147483647
无符号长整形 unsigned long [int] 4 0~4294967295
字符型 [signed] char 1 -128~+127  
无符号字符型 unsigned char 1 0~255
单精度型 float 4 3.4*10e-38~3.4*10e38
双精度型 double 8 1.7*10e-308~1.7*10e308
长双精度型 long double 8 1.7*10e-308~1.7*10e308
51mcu
数据类型 类型标示符  字节 数值范围
整形   [signed] int 2 -32768~+32767
无符号整形 unsigned int 2 0~65535
短整型 short [int] 2 -32768~+32767
无符号短整型 unsigned short [int] 2 0~65535
长整形 long [int] 4 -2147483648~+2147483647
无符号长整形 unsigned long [int] 4 0~4294967295
字符型 [signed] char 1 -128~+127  
无符号字符型 unsigned char 1 0~255
单精度型 float 4 3.4*10e-38~3.4*10e38
双精度型 double 4 3.4*10e-38~3.4*10e38
长双精度型 long double 4 3.4*10e-38~3.4*10e38

ARM
数据类型 类型标示符  字节 数值范围
整形   [signed] int 4 -2147483648~+2147483647
无符号整形 unsigned int 4 0~4294967295
短整型 short [int] 2 -32768~+32767
无符号短整型 unsigned short [int] 2 0~65535
长整形 long [int] 4 -2147483648~+2147483647
双字长整形 long long  8  
无符号长整形 unsigned long [int] 4 0~4294967295
字符型 [signed] char 1 -128~+127  
无符号字符型 unsigned char 1 0~255
单精度型 float 4 3.4*10e-38~3.4*10e38
双精度型 double 8 1.7*10e-308~1.7*10e308
长双精度型 long double 8 1.7*10e-308~1.7*10e308

原文地址:https://www.cnblogs.com/amanlikethis/p/3440402.html