概述
printf("int size = %dn",sizeof(int));
printf("unsigned int size = %dn",sizeof(unsigned int));
printf("short int size = %dn",sizeof(short int));
printf("long size = %dn",sizeof(long));
printf("long int size = %dn",sizeof(long int));
printf("long long int size = %dn",sizeof(long long int));
printf("char size = %dn",sizeof(char));
printf("unsigned char size = %dn",sizeof(unsigned char));
printf("double size = %dn",sizeof(double));
printf("float size = %dn",sizeof(float));
/*输出
int size = 4
unsigned int size = 4
short int size = 2
long size = 4
long int size = 4
long long int size = 8
char size = 1
unsigned char size = 1
double size = 8
float size = 4
*/
最后
以上就是结实书本为你收集整理的C语言数据类型占用字节大小测试的全部内容,希望文章能够帮你解决C语言数据类型占用字节大小测试所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复