当前位置:网站首页>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
边栏推荐
- 坐标转换WGS-84 转 GCJ-02 和 GCJ-02转WGS-84
- MySQL syntax collation (4)
- arcgis js api dojoConfig配置
- Use of fluent custom fonts and pictures
- Transaction processing of SQL Server database
- RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
- MySQL syntax collation (2)
- 高效的串口循环Buffer接收处理思路及代码2
- Openlayers 5.0 reload the map when the map container size changes
- Redis core technology and practice 1 - start with building a simple key value database simplekv
猜你喜欢
5 minutes to achieve wechat cloud applet payment function (including source code)
山大网安靶场实验平台项目—个人记录(四)
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
Lottery applet, mother no longer have to worry about who does the dishes (assign tasks), so easy
MySQL syntax collation (2)
Matlab 2019 installation of deep learning toolbox model for googlenet network
White screen processing method of fulter startup page
优先使用组合而不使用继承
MySQL syntax collation
@MapperScan与@Mapper
随机推荐
MySQL syntax collation (2)
C语言的十六进制printf为何输出有时候输出带0xFF有时没有
Common processing of point cloud dataset
数据库查询 - 选课系统
[report] Microsoft: application of deep learning methods in speech enhancement
How to select the third-party package of golang
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
5 minutes to achieve wechat cloud applet payment function (including source code)
Translation of audio signal processing and coding: Preface
[H264] hevc H264 parsing and frame rate setting of the old version of libvlc
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
First experience of using fluent canvas
openlayers 5.0 加载arcgis server 切片服务
JVM的类加载过程
Use of fluent custom fonts and pictures
UML类图几种关系的总结
SQL server requires to query the information of all employees with surname 'Wang'
一个简单的(基于redisson的)分布式同步工具类封装
Pdf reference learning notes
【webrtc】Add x264 encoder for CEF/Chromium