CCS3.3中每种数据类型的长度和取值范围总结

数据类型

长度(字节)

值域

char

1

ASCII码字符

unsigned char

1

-128~127

signed char

1

0~255

unsigned int

4

0~4294967296

int/signed int

4

-2147483648- 2147483647

unsigned short/unsigned short int

2

0~ 65535

short/short int/signed short/signed short int

2

- 32768~ 32767

unsigned long/unsigned long int

8

0~1.8447e+019

long/long int/signed long/signed long int

8

-9.2234e+018~9.2234e+018

float

4

约精确到小数点后6位数

double

8

约精确到小数点后15位数

你可能感兴趣的:(float)