当前位置:网站首页>Distinction between pointer array and array pointer
Distinction between pointer array and array pointer
2022-04-23 19:29:00 【ToneChip】
Which of the following is an array pointer , Which is a pointer array :
A)
int *p1[10];
B)
int (*p2)[10];
Ask this question every class , There's always something you can't figure out . Here we need to understand a priority problem between symbols .
A)“[]” The priority ratio “*” higher .p1 With the first “[]” combination , The definition of an array , Array name p1,int * It modifies the contents of the array , That is, each element of the array . Now we know , This is an array , It contains 10 A point int Pointer to type data , It's a pointer array
B), ad locum “()” The priority ratio “[]” high ,“*” Number and p2 The definition that constitutes a pointer , The pointer variable name is p2,int It modifies the contents of the array , That is, each element of the array . Array has no name here , It's an anonymous array . Now we know p2 It's a pointer , It points to a containing 10 individual int An array of type data , Array pointer
版权声明
本文为[ToneChip]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231923488506.html
边栏推荐
- MySQL数据库 - 单表查询(三)
- How to use go code to compile Pb generated by proto file with protoc Compiler Go file
- Using oes texture + glsurfaceview + JNI to realize player picture processing based on OpenGL es
- Codeworks round 783 (Div. 2) d problem solution
- Zero cost, zero foundation, build profitable film and television applet
- Regular expressions for judging positive integers
- Garbage collector and memory allocation strategy
- Inject Autowired fields into ordinary beans
- Prefer composition to inheritance
- Core concepts of rest
猜你喜欢
ESP8266-入门第一篇
【webrtc】Add x264 encoder for CEF/Chromium
Oracle configuration st_ geometry
Why is PostgreSQL about to surpass SQL Server?
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
C6748 软件仿真和硬件测试 ---附详细FFT硬件测量时间
MySQL syntax collation (4)
First experience of using fluent canvas
Class loading process of JVM
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
随机推荐
openlayers 5.0 当地图容器大小改变时,重新加载地图
NiO related Basics
An algorithm problem was encountered during the interview_ Find the mirrored word pairs in the dictionary
An idea of rendering pipeline based on FBO
[报告] Microsoft :Application of deep learning methods in speech enhancement
ESP8266-入门第一篇
An example of using JNI to directly access surface data
Transaction processing of SQL Server database
Encyclopedia of professional terms and abbreviations in communication engineering
Customize the non slidable viewpage and how to use it
No, some people can't do the National Day avatar applet (you can open the traffic master and earn pocket money)
【h264】libvlc 老版本的 hevc h264 解析,帧率设定
Oracle配置st_geometry
深度学习——特征工程小总结
Gossip: on greed
MySQL syntax collation (3)
A brief explanation of golang's keyword "competence"
MySQL lock
arcMap 发布切片服务
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies