博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
32位电脑“内置类型"所占空间大小
阅读量:4487 次
发布时间:2019-06-08

本文共 1033 字,大约阅读时间需要 3 分钟。

#include  
using std::cout; using std::cin; using std::endl;#include
using std::string; #include
#include
using std::vector;#include
using std::begin; using std::end;#include
using std::size_t; int main(){ int ia; cout << "the bytes of int is " << sizeof ia << endl; short sa; cout << "the bytes of short is " << sizeof sa << endl; long la; cout << "the bytes of long is " << sizeof la << endl; long long lla; cout << "the bytes of long long is " << sizeof lla << endl; float fa; cout << "the bytes of float is " << sizeof fa << endl; double da; cout << "the bytes of double is " << sizeof da << endl; long double lda; cout << "the bytes of long double is " << sizeof lda << endl; return 0; }

 

输出

 

the bytes of int is 4the bytes of short is 2the bytes of long is 4the bytes of long long is 8the bytes of float is 4the bytes of double is 8the bytes of long double is 12

 

转载于:https://www.cnblogs.com/vczf/p/6823264.html

你可能感兴趣的文章
rtrim
查看>>
Educational Codeforces Round 34 (Rated for Div. 2) D - Almost Difference(高精度)
查看>>
awk调用系统命令
查看>>
Android SharedPreference 数据存储
查看>>
Mark Down初学
查看>>
Python之路【第九篇】堡垒机基础&数据库操作
查看>>
小教练教MM如何去掉你的小肚子
查看>>
JS跨域请求
查看>>
jmeter之Dummy Sampler
查看>>
MySQL 调优基础(四) Linux 磁盘IO
查看>>
为什么选择Android Studio 而是 Eclipse
查看>>
Linux 系统目录结构(二)
查看>>
数列分块入门 1
查看>>
PHP一个失败的类,解析。。。。
查看>>
DOMDocument类文件
查看>>
JS Closure 闭包
查看>>
bzoj 1578: [Usaco2009 Feb]Stock Market 股票市场【背包】
查看>>
hdu 3038 How Many Answers Are Wrong【带权并查集】
查看>>
二叉树的基本操作
查看>>
软件工程之寻找水王
查看>>