C语言中(Vc6.0),int, char,double分别占多少字节

 时间:2026-04-24 02:03:27

int分为long int和short int,其中long int是4个字节,short int是2个字节。

char 1个字节。

double 8个字节。

拓展资料:

16位编译器

C语言中(Vc6.0),int, char,double分别占多少字节

char :1个字节char*(即指针变量): 2个字节short int : 2个字节int:  2个字节unsigned int : 2个字节float:  4个字节double:   8个字节long:   4个字节long long:  8个字节unsigned long:  4个字节

32位编译器

C语言中(Vc6.0),int, char,double分别占多少字节

char :1个字节char*(即指针变量): 4个字节(32位的寻址空间是2^32, 即32个bit,也就是4个字节。同理64位编译器)short int : 2个字节int:  4个字节unsigned int : 4个字节float:  4个字节double:   8个字节long:   4个字节long long:  8个字节unsigned long:  4个字节

64位编译器

C语言中(Vc6.0),int, char,double分别占多少字节

char :1个字节char*(即指针变量): 8个字节short int : 2个字节int:  4个字节unsigned int : 4个字节float:  4个字节double:   8个字节long:   8个字节long long:  8个字节unsigned long:  8个字节

  • 怎么在Python中创建一个字典
  • C语言中的scanf函数怎样输入字符串?
  • python如何随机生成一个整数?
  • 离散数学具有传递性的关系图有什么特点
  • 在c语言中如何计算字符串的长度?
  • 热门搜索
    台式机怎么连接无线网 qq找回密码的方法 心动过速的治疗方法 左胸痛是怎么回事 新鲜百合怎么做好吃 大龙虾怎么做好吃 万年青的养殖方法和注意事项 鼻子里面干疼结痂是怎么回事 增高方法 富贵竹的养殖方法和注意事项