首页 > 试题广场 >

在 64 位操作系统中, long 类型占[$##$]字节。

[填空题]
64 位操作系统中, long 类型占1字节。
之前面试遇到过,和操作系统环境有关,是编译器去适应平台.所以真正决定占多少字节取决于你的device platforms. 其实无论哪种模型short和char无论哪种model下都保持一致. 我们见得最多的就是ILP32LL模型.这种模型下int和long已经pointer占4个字节 long long占8个字节. 参见下面的注释: As you can see, the typical data type sizes match the ILP32LL model, which is what most compilers adhere to on 32-bit platforms. The LP64 model is the de facto standard for compilers that generate code for 64-bit platforms.
发表于 2017-09-03 23:21:41 回复(0)
8
发表于 2017-08-31 00:16:50 回复(0)
8
发表于 2017-08-30 15:17:16 回复(0)
应该是8个字节?
发表于 2017-08-27 10:55:15 回复(0)
8个字节吧?
发表于 2017-08-22 16:03:14 回复(0)