多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 数据类型 ## 常用的数据类型 一.带符号 ``` char short int long long long ``` 二.不带符号(整型) ``` unsigned char unsigned short unsigned int unsigned long unsigned long long ``` |类型 | 内存占用(字节)|取值范围 | --signed char - | 1--- |-128到127 | char | 1 |-128到127 | short -- | -2- | -32768到32767 | short int | 2 |-32768到32767 | signed short | 2 |-32768到32767 | -signed short int -- | --2- |-32768到32767 | int | 4 |-2147483648到2147483647 | singned |4 |-2147483648到2147483647 | -singned int -- | -4-- |-2147483648到2147483647 | long | 4/8 |4字节-2147483648到2147483647 8字节 -9223372036854775808到9223372036854775807 | ---long int | --4/8 - |4字节-2147483648到2147483647 8字节 -9223372036854775808到9223372036854775807 | signed long | 4/8 |4字节-2147483648到2147483647 8字节 -9223372036854775808到9223372036854775807 | signed long int | 4/8 |4字节-2147483648到2147483647 8字节 -9223372036854775808到9223372036854775807 | -long long -- | -8-- | 8字节 -9223372036854775808到9223372036854775807 | long long int | 8 | 8字节 -9223372036854775808到9223372036854775807 | signed long long | 8 | 8字节 -9223372036854775808到9223372036854775807 | --signed longlong int- | -8-- | 8字节 -9223372036854775808到9223372036854775807 #### 注意:整型的取值范围去掉以上的负数,就是整型取值范围。