char、int、long它们各占几个字节?占几位? |
您所在的位置:网站首页 › int储存空间 › char、int、long它们各占几个字节?占几位? |
转自:http://wenwen.soso.com/z/q104804861.htm 整型 int 4字节 长整型 long 4字节 字符型 char 1字节 单精度 float 4字节 双精度 double 8字节 长双精度 long double 8字节 换算关系: 1GB=1024MB 1MB=1024KB 1KB=1024Byte 1Byte=8Bit 一个字节等于八个位
额外补充: C语言基本数据类型 类型 位长度 char 8 unsigned char 8 signed char 8 int 16 unsigned int 16 signed int 16 short int 16 unsigned short int 16 signed short int 16 long int 32 signed long int 32 float 32 double 64 long double 64 以上是16位机上的C数据类型。 在32位机子上int 为4字节 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |