C中的整数大小 [英] Size of integer in C

查看:166
本文介绍了C中的整数大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:

int的大小取决于编译器和/或处理器吗?


blockquote>



Integer的大小取决于编译器还是OS或处理器?如果我在使用32位或64位操作系统的32位操作系统或64位操作系统上运行gcc(在这种情况下只能运行64位操作系统),那么该怎么办? class =h2_lin>解决方法

取决于编译器 options

当然也取决于编译器本身。

但编译器是为特定的操作系统,所以它取决于操作系统

和/或

编译器是针对特定的处理器制作的,因此它取决于处理器


Possible Duplicate:
Does the size of an int depend on the compiler and/or processor?

Does the size of Integer depend on Compiler or on OS or on Processor? What if I use gcc on both 32 bit OS or 64bit OS running either on 32 bit machine or 64 bit machine(only 64 bit OS in this case).

解决方案

Depends on compiler options.
Of course it depends on the compiler itself too.
But the compiler was made for a specific OS, so it depends on the OS
And / or
The compiler was made for a specific processor, so it depends on the processor

这篇关于C中的整数大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆