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));
}
/*********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));
}
相关文章推荐
- 【转】重读C#高级编程之几个运算符在实际中的应用:is,as,sizeof,typeof,GetType,??
- 重读C#高级编程之几个运算符在实际中的应用:is,as,sizeof,typeof,GetType,??
- C++基础知识 sizeof运算符应用的总结
- Shell 中位运算符的应用(特别举例按位非)
- C语言中sizeof()求字节数的应用举例
- Shell 中位运算符的应用(特别举例按位非)
- 平稳退化的应用举例
- sizeof运算符详解
- 【数据结构】 队列的应用举例——更好的学习和理解队列
- UML2工具——活动图应用举例
- is 与 as 运算符举例
- 关于sizeof与strlen在字符串应用的区别
- CSS “渐进增强”在web制作中常见应用举例
- jasperReport应用举例
- 键盘记录器-------HOOK的应用举例
- sysconf()函数应用举例:查看CPU及内存信息
- 指针、数组与sizeof运算符
- :after伪类+content内容生成经典应用举例
- isMemberOfClass的使用举例isKindOfClass的应用举例
- 关于sizeof运算符