当前位置:网站首页>Fundamentals of C language -- the data type meaning of 2-4 pointers and the analysis of forced type conversion
Fundamentals of C language -- the data type meaning of 2-4 pointers and the analysis of forced type conversion
2022-07-23 16:59:00 【Bazinga bingo】
List of articles
The data type meaning of the pointer
A pointer involves two variables : A pointer variable itself , One is the variable pointed to by the pointer variable
int *p
p( The pointer variable itself ) yes int * type ,*p( The variable pointed to by the pointer ) yes int type
int * It's the pointer type , As long as the pointer type is occupied 4 Bytes , The resolution method is based on the address . All pointer types ( Whether it's int *、char *、double *) The parsing method is the same , They're all addresses .
For the variable pointed to by the pointer , The type of pointer is important . The type of the variable pointed to by the pointer ( The resolution method of its corresponding memory space ) It depends on the pointer type . If the pointer is int * Of , Then the variable pointed to by the pointer is int Type of .
Pointers and cast types
The data type meaning of variables
All types of data are stored in memory , Are stored in binary format . So there is only 0 and 1, I don't know int Type or double type .
int、char、short And so on belong to plastic surgery , Their storage was ( Convert to binary and store in memory ) It's the same , It's just that the memory grid size is different ( So these shaping formats are compatible with each other ). and float and double The storage methods of are different from each other , And plastic surgery is even different .
It is stored according to the data type of the variable itself . But when it is taken out, it is parsed and taken out according to the given data type by the programmer .
C The nature of data types in languages , This determines how this number is stored in memory , That is, it determines how to convert this number into binary . Memory is just a warehouse , It's full of 1 and 0, No matter inside 0 and 1 What does it mean to combine .
边栏推荐
- 低代码搭建校园信息化管理系统案例分析
- 微信小程序class绑定,怎么绑定2个变量
- Nifi 1.16.3 cluster setup +kerberos+ user authentication
- 国内生产总值(GDP)数据可视化
- 【TensorFlow】检测TensorFlow GPU是否可用
- UiPath Studio Enterprise 22.4 Crack
- Object.defineproperty method, data agent
- 48:第五章:开发admin管理服务:1:创建子工程【imooc-news-dev-service-admin】,管理服务模块;
- pwn入门(3)堆
- Notes on Microcomputer Principle and technical interface
猜你喜欢

无心剑英汉双语诗006.《致爱妻》

基于APISIX的basic-auth插件对Minio文件上传功能进行授权

Satisfiability of the equation of leetcode

O3DF执行董事Royal O’Brien:开源没有边界,所有共享的声音都会变成实际方向

Cuibaoqiu, vice president of Xiaomi group: open source is the best platform and model for human technological progress

Nodejs implements token login registration (koa2)

灰色预测(MATLAB)

【TensorFlow】检测TensorFlow GPU是否可用

Lake Shore - empx-h2 low temperature probe station

微机原理与技术接口笔记
随机推荐
拼多多APP商品详情接口获取activity_id值(拼多多activity_id接口)
Notes on Microcomputer Principle and technical interface
Network protocol and attack simulation: Wireshark use, ARP Protocol
uni-app进阶之认证【day12】
FIO performance testing tool
微机原理与技术接口课后作业总结
精确的目标检测中定位置信度的获取
2022-7-22 面经复习+简单题目整理
Lake Shore—EMPX-H2 型低温探针台
go语言多返回值以及返回错误类型
英特尔nuc能代替主机吗_终于圆满了!最新款的Intel NUC迷你主机上线
Direct exchange
基于APISIX的basic-auth插件对Minio文件上传功能进行授权
YOLOv4: Optimal Speed and Accuracy of Object Detection
[C language] structure, enumeration and union
实时疫情数据可视化分析
VMware虚拟机的三种网络模式
securecrt 乱码
Deep learning convolutional neural network paper study alexnet
pwn入门(3)堆