摘要: 1. sizeof 作用:利用sizeof可以统计数据类型所占内存大小。 语法:sizeof(数据类型/变量)。 示例: #include <iostream> using namespace std; int main() { int a = 10; short b = 10; long c = 阅读全文
posted @ 2022-06-09 05:05 (⊃・ᴥ・)つ 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1.整型 1.1 short短整型 占用空间:2字节,取值范围:(-2^15~2^15-1) 1.2 int整型 占用空间:4字节,取值范围:(-2^31~2^31-1) 1.3 long长整型 占用空间:win为4字节,linux32位为4字节,64位为8字节,取值范围:(-2^31~2^31-1 阅读全文
posted @ 2022-06-09 04:41 (⊃・ᴥ・)つ 阅读(111) 评论(0) 推荐(0) 编辑