C语言怎么计算longlong,longdouble字节大小
这篇文章主要讲解了“C语言怎么计算long long, long double字节大小”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“C语言怎么计算long long, long double字节大小”吧!
成都创新互联公司主营长兴网站建设的网络公司,主营网站建设方案,重庆APP开发公司,长兴h5重庆小程序开发搭建,长兴网站营销推广欢迎长兴等地区企业咨询
计算 long long, long double 字节大小
实例
#include
intmain(){
inta; longb;
longlongc;
doublee;
longdoublef;
printf("Size of int = %ld bytes\n",sizeof(a));
printf("Size of long = %ld bytes\n",sizeof(b));
printf("Size of long long = %ld bytes\n",sizeof(c));
printf("Size of double = %ld bytes\n",sizeof(e));
printf("Size of long double = %ld bytes\n", sizeof(f));
return0;
}
运行结果:
Size of int = 4 bytes Size of long = 8 bytes Size of long long = 8 bytes Size of double = 8 bytes Size of long double = 16 bytes
感谢各位的阅读,以上就是“C语言怎么计算long long, long double字节大小”的内容了,经过本文的学习后,相信大家对C语言怎么计算long long, long double字节大小这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!
分享标题:C语言怎么计算longlong,longdouble字节大小
文章位置:http://myzitong.com/article/ijdoje.html