C中sizeof()的用法——32位和64位下的sizeof()
机器平台:X86_64 处理器
操作系统:Red Hat 4.1.2-14
编译器: gcc version 4.1.2 20070626
Size of char is: 1
Size of unsigned char is: 1
Size of signed char is: 1
Size of int is: 4
Size of short is: 2
Size of long is: 8
Size of long int is: 8
Size of signed int is: 4
Size of unsigned int is: 4
Size of unsigned long int is: 8
Size of long long int is: 8
Size of unsigned long long is: 8
Size of float is: 4
Size of double is: 8
Size of long double is: 16
Size of (void *) is: 8
Size of (char *) is: 8
Size of (int *) is: 8
Size of (long *) is: 8
Size of (long long *) is: 8
Size of (float *) is: 8
Size of (double *) is: 8
所有指针都是占8字节
——————————————————————————
机器平台: X86_32 处理器
操作系统: Windows XP SP2
编译器: VS2005自带的C++编译器
Size of char is: 1
Size of unsigned char is: 1
Size of signed char is: 1
Size of int is: 4
Size of short is: 2
Size of long is: 4
Size of long int is: 4
Size of signed int is: 4
Size of unsigned int is: 4
Size of unsigned long int is: 4
Size of long long int is: 8
Size of unsigned long long is: 8
Size of float is: 4
Size of double is: 8
Size of long double is: 8
Size of (void *) is: 4
Size of (char *) is: 4
Size of (int *) is: 4
Size of (long *) is: 4
Size of (long long *) is: 4
Size of (float *) is: 4
Size of (double *) is: 4
所有指针都是占4字节
C中sizeof()的用法——32位和64位下的sizeof()的更多相关文章
- Shell脚本中,如何判断Linux系统是32位还是64位?
一行就能搞定,输出32或者64 可以用“和. 参考代码如下: ldconfig if [ $(getconf WORD_BIT) = '32' ] && [ $(getconf LON ...
- linux内核学习之三:linux中的"32位"与"64位"
在通用PC领域,不论是windows还是linux界,我们都会经常听到"32位"与"64位"的说法,类似的还有"x86"与"x86 ...
- 第十七章——配置SQLServer(2)——32位和64位系统中的内存配置
原文:第十七章--配置SQLServer(2)--32位和64位系统中的内存配置 前言: 本文讲述32位和64位系统中的内存配置,在SQLServer 2005/2008中,DBA们往往尝试开启AWE ...
- linux中的"32位"与"64位"
linux内核学习之三:linux中的"32位"与"64位" 在通用PC领域,不论是windows还是linux界,我们都会经常听到"32位" ...
- 【原创】在Windows系统中使用VC9、VC11编译32位、64位PHP及其扩展
项目中需要使用runkit模块实现AOP,但是团队成员的开发环境都是Windows,而runkit模块官方没有提供Windows环境下的dll扩展,只能自己编译. 下面是编译过程的分类总结.(操作系统 ...
- iOS-程序发布-32位和64位系统的兼容
在苹果推出iPhone5S时,64位的应用就走到了眼前.当时就看见苹果官方资料宣布iOS7.x的SDK支持了64位的应用,而且内置的应用都已经是64位. 我记得自己刚刚接触电脑时还有16位的系统,指针 ...
- VB.NET实现32位、64位远线程运行ASM,注入非托管、托管DLL
这是一个老话题,远线程函数给我们提供了机会在其他进程中启动一个新线程,所以我们可以做很多事情.但事情远远没有结束,如果我们要做的事情非常复杂,那么将面临编写大量的ASM代码,虽然我们可以用VC之类的工 ...
- C语言在32位和64位机器下数字数据类型的字节数取决于编译器和平台, 主要由编译器决定。
C语言中数字数据类型的字节数 C声明 32位机器 64位机器 char 1 1 short int 2 2 int 4 4 //整型在32位和64位下都是4个字节 long int 4 8 l ...
- 64位主机64位oracle下装32位客户端ODAC(NFPACS版)
64位主机64位oracle下装32位客户端ODAC(NFPACS版) by dd 1.下载Oracle Data Access Components(ODAC) Xcopy的两个版本: x86:(我 ...
- Windows2003 IIS6.0支持32位和64位两种模式的设置方法
IIS 6.0 可支持 32 位和 64 位两种模式.但是,IIS 6.0 不支持在 64 位版本的 Windows 上同时运行这两种模式.ASP.NET 1.1 只在 32 位模式下运行.而 ASP ...
随机推荐
- How to: Host and Run a Basic Windows Communication Foundation Service
This is the third of six tasks required to create a Windows Communication Foundation (WCF) applicati ...
- c语言诊断_断言库函数#include<assert.h>
诊断<assert.h> assert #include <assert.h> void assert(int exp); assert宏用于为程序增加诊断功能.当asser ...
- Discuz!NT中集成Memcached分布式缓存
大约在两年前我写过一篇关于Discuz!NT缓存架构的文章,在那篇文章的结尾介绍了在IIS中如果开启多个应用程序池会造成多个缓存实例之间数据同步的问题.虽然给出了一个解决方案,但无形中却把压力转移到了 ...
- c#抓取当前电脑显示分辨率
using System.Windows.Forms; 获取屏幕分辨率 int SH = Screen.PrimaryScreen.Bounds.Height; ...
- 基于WebForm+EasyUI的业务管理系统形成之旅 -- 施工计划安排(Ⅶ)
上篇<基于WebForm+EasyUI的业务管理系统形成之旅 -- 首页Portal界面拖拽>,主要介绍首页随客户喜好安排区块位置,更好的实现用户体验. 这两天将项目中施工计划管理归纳总结 ...
- Java开发心得
1. Spring概述 Spring 是一个开源框架,是为了解决企业应用程序开发复杂性由Rod Johnson创建的.框架的主要优势之一就是其分层架构,分层架构允许使用者选择使用哪一个组件,同时为 J ...
- HDU 3427
DP: According to the meaning of problems,if we check n to m, assume x and y are both solvable,then w ...
- Sum It Up
http://acm.hdu.edu.cn/showproblem.php?pid=1258 Sum It Up Time Limit: 2000/1000 MS (Java/Others) M ...
- (转)使用pth文件,让python方便的import自己写的模块
转自:http://www.elias.cn/Python/PythonPath 文章简单易懂,有理有据. 有时候我们正在修改或调试的程序会是一个库,为修改方便,我们可能不大希望把它放到 site-p ...
- [CODEVS1048]石子归并
时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description 有n堆石子排成一列,每堆石子有一个重量w[i], 每次合并可以合并相邻的两堆石子 ...