C语言中的数据类型
char |
2^7=128 | ||
unsigned char | 2^8=256 | ||
short | 短整数 2个字节 16个比特 | 2^15=32768 | -32768~32767 |
unsigned short | 2^16=65536 | 0~65535 | |
long | 长整数 4个字节 | 2^31=2147483647 | |
unsigned long | 2^32=4.2949673e9 | ||
int | 4个字节 | ||
int :有符号
uint:无符号
1 /********************************************************************************************************* 2 工程代码定义格式*********************************************************************************************************/ 3 typedef unsigned char BOOLEAN; 4 typedef unsigned char INT8U; 5 typedef unsigned char uint8; /*后面的数字指的是变量所占的比特*/ 6 7 typedef signed char INT8S; 8 typedef signed char int8; 9 10 typedef unsigned short INT16U; 11 typedef unsigned short uint16; 12 13 typedef signed short INT16S; 14 typedef signed short int16; 15 16 typedef unsigned long INT32U; /* */ 17 typedef unsigned long uint32; 18 19 typedef signed long INT32S; 20 typedef signed long int32; 21 22 typedef float FP32; 23 typedef double FP64; 24