当前位置:网站首页>char short int等类型变量在内存中占用字节数
char short int等类型变量在内存中占用字节数
2022-07-21 16:51:00 【疯狂的Alex】
如图,在DEV C++中直接编程,通过sizeof 关键字打印出各个变量类型所占用的字节数
可以看到右侧输出结果与左侧代码的对应关系,即:
char 1字节;short 2字节;int 4字节 ;long 4字节 ;float 4字节;double 8字节;
以后忘记了可以在代码中直接通过sizeof关键字来查看
边栏推荐
- Yiwen teaches you five tips for detecting whether MOS tubes are good or bad "suggestions collection"
- 小程序选项卡
- 科研总结/编程常见问题
- Next.js 与 Remix
- Fast Fourier transform, Lagrange interpolation, three thousand words with examples, sister chapters, application of FFT and string matching
- JMeter --- FTP performance test
- PMP candidates note that the examinations in these regions will be postponed
- 解密“海莲花”组织(域控检测防御)
- MySql中on与where的区别个人总结——分清楚条件应该写在哪里
- 特征选择小结:过滤式、包裹式、嵌入式
猜你喜欢
Finer grained useeffect
深度学习1感知机及实现简单反向传播网络
How to cache with blob object in browser
强连通分量
Dubai launches national meta universe strategy
服务器切换不同的conda环境以及查看各个用户进程
更细粒度的 useEffect
[case design] event distributor - sharing and implementation of cross class event response ideas
leetcode-09(下一个排列+快乐数+全排列)
Airflow详细搭建过程(亲测 + 总结)
随机推荐
科研总结/编程常见问题
Generating function (linear recursive relationship, generating function concept and formula derivation, violent calculation) 4000 word detailed analysis, with examples
出入栈顺序的讨论及合法性
DS二叉树——二叉树之父子结点
Web3 couldn't escape the palm of these old giants
C语言大小端模式判断函数
DS排序--快速排序
Two concepts for community construction
机器学习之时间序列
无线充电原理与QI协议详解[通俗易懂]
SQL Server Setting UUID
Mysql REGEXP不区分大小写解决办法
DS内排—堆排序
性能测试----测试执行
Fast Fourier transform, Lagrange interpolation, three thousand words with examples, sister chapters, application of FFT and string matching
Next. JS and Remix
No.js---基于V8和io_uring的JS运行时
Qt5 static link OpenSSL error handling
R语言使用mean函数计算样本(观测)数据中指定变量的相对频数:计算dataframe中指定数据列偏离平均值超过两个标准差的观测样本所占总体的比例
Partage des données | données du module Bluetooth HC - 05