当前位置:网站首页>On the use of constant pointer and pointer constant -- exercise (record)
On the use of constant pointer and pointer constant -- exercise (record)
2022-04-23 05:27:00 【What’smean】
Constant pointer :
Definition : A constant pointer is essentially a pointer , But the object pointed to by this pointer is a constant .
Statement : int const * a; or const int * a;
notes :const int i=3; int const * a=&i; const int j = 4; a=&j; // legal
The object pointed to by the constant pointer cannot be modified by this pointer , But because the constant pointer itself is a variable , therefore , Can be reassigned .
constant pointer :
Definition : A pointer constant is essentially a constant , But the value of this constant is a pointer .
Statement : int * const a;
notes :const int i=3; int * const a= &i; *a = 4; // legal
The value of a pointer constant is a pointer , Because this value is constant , So the pointer itself cannot be changed . however , The contents of the pointer can be changed .
版权声明
本文为[What’smean]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220544124415.html
边栏推荐
- What role do tools play in digital transformation?
- Quick app bottom navigation bar
- d.ts---更详细的知识还是需要看官网的介绍(声明文件章节)
- CPT 104_TTL 09
- FileReader API file operation
- Top 25 Devops tools in 2021 (Part 2)
- What are the reasons for the failure of digital transformation?
- 2021-09-28
- Self incrementing sequence creation of MySQL
- Three 之 three.js (webgl)旋转属性函数的简单整理,以及基于此实现绕轴旋转的简单案例
猜你喜欢
When is it appropriate for automated testing? (bottom)
Basic knowledge of redis
What are the most popular recruitment technical skills in 2022? You can't think of it
Master-slave replication of MariaDB database
如果我是pm之 演出电影vr购票展示
Box collapse and margin collapse
相机成像+单应性变换+相机标定+立体校正
SQL Server检索SQL和用户信息的需求
2021-09-28
我这位老程序员对时代危险和机遇的一点感悟?
随机推荐
Graphics.FromImage报错“Graphics object cannot be created from an image that has an indexed pixel ...”
Output string in reverse order
Camera imaging + homography transformation + camera calibration + stereo correction
Create cells through JS (while loop)
d. TS --- for more detailed knowledge, please refer to the introduction on the official website (chapter of declaration document)
Why can't V-IF and V-for be used together
Fast application fuzzy search
When is it appropriate for automated testing? (bottom)
Study notes: unity customsrp-10-point and spot shadows
[untitled]
varnish入门
The annual transaction volume of the app store is US $1 million, and only 15% commission is paid. Small and medium-sized developers are very contradictory
What are the reasons for the failure of digital transformation?
Box collapse and margin collapse
egg测试的知识大全--mock、superTest、coffee
Qingdao agile tour, coming!
【openh264】cmake: msopenh264-static
史上最强egg框架的error处理机制
es6数组的使用
Uncle wolf is looking for a translator -- Plato -- ongoing translation