当前位置:网站首页>指针常量与常量指针 巧记
指针常量与常量指针 巧记
2022-08-05 05:24:00 【毕竟是shy哥】
从右往左看,const右边是谁,谁就不能改变!!
- 怎么读呢,const表示常量,*表示指针,按照先后顺序连起来读就可以了。
- 常量指针
int const * p1=&number;
速记: p1表示指针,*p1表示内容,即“const内容”,内容是常量,即内容不可以修改(可以修改p1的指向)
2. 指针常量
int * const p1=&number;
速记:p1是指针,const p1,即“常量p1”,也就是p1不可以修改,即p1的指向不可以修改(可以通过p1修改其内容)
边栏推荐
- What is Alibaba Cloud Express Beauty Station?
- The highlight moment of operation and maintenance starts with intelligence
- Teach you simple steps to achieve industrial raspberries pie properly installed RS232 USB drive
- 记录vue-页面缓存问题
- reduce()方法的学习和整理
- 用户和用户组管理、文件权限管理
- In-depth Zabbix user guide - from the green boy
- Xiaodu Xiaodu is here!
- [ingress]-ingress exposes services using tcp port
- VRRP overview and experiment
猜你喜欢
随机推荐
教您简单几步实现工业树莓派正确安装RS232转USB驱动
flink cdc 目前支持Gauss数据库源吗
Into the pre-service, thought they play so flowers
NAT实验
VRRP overview and experiment
What should I do if the SSL certificate prompts that it is expired or invalid?
磁盘管理与文件系统
Cloud computing - osi seven layers and TCP\IP protocol
Four ways to obtain Class objects through reflection
BIO,NIO,AIO实践学习笔记(便于理解理论)
Detailed explanation of ten solutions across domains (summary)
网络协议基础-学习笔记
DevOps-了解学习
King power volume LinkSLA, realize operations engineer is happy fishing
What's the point of monitoring the involution of the system?
disabledDate 日期选择器 datePicker
H5 的浏览器存储
单臂路由实验和三层交换机实验
Mina的长连接和短连接
Billions of IT operations in the market, the product by strength to speak