当前位置:网站首页>什么是数据类型?数据类型有什么用?
什么是数据类型?数据类型有什么用?
2022-07-03 07:42:00 【是北豼不太皮吖】
基本数据类型

什么是数据类型
数据类型就好像一个模子,short、int、long、char、float、double 这六个就是不同大小的模子。
数据类型有什么用
拿着它们在内存上咔咔咔,不同大小的内存就分配好了,当然别忘了给它们取个好听的名字。在 32 位的系统上 short 咔出来的内存大小是 2 个 byte;int 咔出来的内存大小是 4 个 byte;long 咔出来的内存大小是 4 个 byte;float 咔出来的内存大小是 4 个 byte;double 咔出来的内存大小是 8 个 byte;char 咔出来的内存大小是 1 个 byte。(注意这里指一般情况,可能不同的平台还会有所不同,具体平台可以用 sizeof 关键字测试一下)。
边栏推荐
- 昇思MindSpore再升级,深度科学计算的极致创新
- 华为交换机配置ssh登录远程管理交换机
- Redis view client connection
- Structure of golang
- Technology dry goods | Roberta of the migration of mindspore NLP model - emotion analysis task
- 基于RNA的新型癌症疗法介绍
- 项目经验分享:基于昇思MindSpore,使用DFCNN和CTC损失函数的声学模型实现
- 技术干货|昇思MindSpore Lite1.5 特性发布,带来全新端侧AI体验
- Project experience sharing: realize an IR Fusion optimization pass of Shengsi mindspire layer
- Image recognition and detection -- Notes
猜你喜欢

PAT甲级 1029 Median

【MySQL 11】怎么解决MySQL 8.0.18 大小写敏感问题

Leetcode 198: house raiding

研究显示乳腺癌细胞更容易在患者睡觉时进入血液

Go language foundation ----- 07 ----- method

HDMI2.1与HDMI2.0的区别以及转换PD信号。

【MindSpore论文精讲】AAAI长尾问题中训练技巧的总结

Pat class a 1031 Hello world for u

Go language foundation ------ 12 ------ JSON

密西根大学张阳教授受聘中国上海交通大学客座教授(图)
随机推荐
Application of pigeon nest principle in Lucene minshouldmatchsumscorer
Static keyword
Epoll related references
技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务
opensips与对方tls sip trunk对接注意事项
Go language - loop statement
华为S5700交换机初始化和配置telnet,ssh用户方法
Image recognition and detection -- Notes
Segment read
【LeetCode】4. Best time to buy and sell stock
华为交换机配置ssh登录远程管理交换机
Implementation of breadth first in aggregation in ES
Redis view client connection
Go language foundation ----- 11 ----- regular expression
Lucene skip table
技术干货|昇思MindSpore NLP模型迁移之Bert模型—文本匹配任务(二):训练和评估
EtherCAT state machine transition (ESM)
Technical dry goods | some thoughts on the future of AI architecture
输入三次猜一个数字
【MySQL 14】使用DBeaver工具远程备份及恢复MySQL数据库(Linux 环境)