【C/C++基础】C语言数据类型表

C语言数据类型表

关键字位长(字节)范围格式化字符串
char1 bytes-128…127(或0…255,与体系结构相关)%c
unsigned char1bytes0…255%c, %hhu
signed char1bytes-128…127%c, %hhd, %hhi
int2bytes(16位系统) 或 4bytes-32768…32767 或 -2147483648…2147483647%i, %d
unsigned int2bytes 或 4 bytes0…65535 或 0…4294967295%u
signed int2bytes 或 4bytes-32768…32767 或 -2147483648…2147483647%i, %d
short int2bytes-32768…32767%hi, %hd
unsigned short2 bytes0…65535%hu
signed short2bytes-32768…32767%hi, %hd
long int4bytes 或 8bytes[6]-2147483648…2147483647 或 -9223372036854775808…9223372036854775807%li, %ld
unsigned long4bytes 或 8 bytes0…4294967295 或 0…18446744073709551615%lu
signed long4 bytes或 8bytes-2147483648…2147483647 或 -9223372036854775808…9223372036854775807%li, %ld
long long8bytes-9223372036854775808…9223372036854775807%lli, %lld
unsigned long long8bytes0…18446744073709551615%llu
float4bytes2.939x10−38…3.403x10+38 (7 sf)%f, %e, %g
double8bytes5.563x10−309…1.798x10+308 (15 sf)%lf, %e, %g
long double10bytes或 16bytes7.065x10-9865…1.415x109864 (18 sf或33 sf)%lf, %le, %lg
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值