這篇文章主要講解了“C語言怎么計算long long, long double字節(jié)大小”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“C語言怎么計算long long, long double字節(jié)大小”吧!
成都創(chuàng)新互聯(lián)公司主營長興網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,重慶APP開發(fā)公司,長興h5重慶小程序開發(fā)搭建,長興網(wǎng)站營銷推廣歡迎長興等地區(qū)企業(yè)咨詢
#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;
}
運(yùn)行結(jié)果:
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字節(jié)大小”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對C語言怎么計算long long, long double字節(jié)大小這一問題有了更深刻的體會,具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識點(diǎn)的文章,歡迎關(guān)注!