您的位置:首页 > 其它

sizeof运算符应用举例

2010-03-16 14:20 330 查看
/**********版权所有**禁止拷贝***/
/*********sizeof应用举例******/

#include<stdio.h>

main()
{
int n;
short s;
unsigned short us;
unsigned int ui;
long I;
float f;
double d;
char ch;
printf("**********版权所有**禁止拷贝*** /n");
printf("*********sizeof应用举例****** /n");
printf(" sizeof (int)= %d/n",sizeof(n));
printf(" sizeof (short)= %d/n",sizeof(s));
printf("sizeof(unsigned)= %d/n",sizeof(us));
printf("sizeof(long)= %d/n",sizeof(ui));
printf("sizeof(float)= %d/n",sizeof(I));
printf("sizeof(double)= %d/n",sizeof(d));
printf("sizeof(char)= %d/n",sizeof(ch));
}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: