当前位置:网站首页>C language complex type description
C language complex type description
2022-06-13 01:56:00 【richardgann】
We often encounter some complicated pointer type descriptions , Many beginners may feel a little confused , In fact, according to a rule to analyze , It is not difficult at all
The laws of : Start with the variable name , According to the priority of combination , Step by step to analyze
explain :1、[] Is greater than *
2、() The priority of is greater than that of the pointer
principle :1、 The pointer and A combination , The content pointed to is A
2、 An array with the A combination , Then the data type of each element in the array is A
3、 The standard form of the function is : Function return value type Function name ( parameter list )
int p // This is a normal integer variable
int *p // This is a pointer , The content pointed to by the pointer is integer data
int p[3] // This is a normal array , Yes 3 Elements , The data of each element is an integer
int *p[3] //p Precede [] combination , This is an array , There are 3 Elements , And again * combination , Indicates that the type of each element is a pointer , And again int combination , Indicates that each pointer points to int type
int (*p)[3] // p The first and * combination , Description is a pointer , Then with [] combination , What the pointer points to is an array , The array has 3 Elements , And again int combination , Explain that each element is int type
int **p // Is an ordinary two-level pointer
int p(int ) // An ordinary function p, The return value is int type , The parameter of the function is int type
int (*p)(int) //*p It's a pointer , And again () combination , The pointer points to a function , Look again () Medium int , Description: the function parameter is int type , Combine the leftmost int, The return value of the function is also int type
int *(*p(int))[3] // p The first and () combination , explain p It's a function , The function parameter is int type , And again * combination , The return value of this function is a pointer , Follow again [] combination , The pointer refers to an array , The array has 3 Yuan // plain , And again * combination , The type of each element is a pointer , Then each pointer points to int type .
边栏推荐
- 服务器安装jupyterlab以及远程登录配置
- Leetcode question 20
- 回顾ITIL各版本历程,找到企业运维发展的关键点
- Restrict cell input type and display format in CXGRID control
- Ctrip reshapes new Ctrip
- Padavan mounts SMB sharing and compiles ffmpeg
- 5、 Improvement of inventory query function
- General IP address, account and password of mobile IPv6 optical cat login, and mobile optical cat is in bridging mode
- QT realizes mind mapping function (II)
- numpy多维数组转置transpose
猜你喜欢

MySQL download and installation

What is the path field—— Competitive advertising

6、 Implementation of warehouse out management function

华为设备配置IP和虚拟专用网混合FRR

Use mediapipe+opencv to make a simple virtual keyboard

水管工遊戲

谷歌的受众群体是如何发挥作用的?

Simple ranging using Arduino and ultrasonic sensors

dfs与bfs解决宝岛探险
![[the fourth day of actual combat of stm32f401ret6 smart lock project in 10 days] voice control is realized by externally interrupted keys](/img/fc/f03c7dc4d5ee12aaa301f54e4cd3f4.jpg)
[the fourth day of actual combat of stm32f401ret6 smart lock project in 10 days] voice control is realized by externally interrupted keys
随机推荐
Plumber game
Audiences with similar interests
How many smart bids does Google have?
Decoding iFLYTEK open platform 2.0 is a fertile land for developers and a source of industrial innovation
How does Google's audience work?
In addition to the full screen without holes under the screen, the Red Devils 7 series also has these black technologies
Qt实现思维导图功能(二)
Use of Arduino series pressure sensors and detected data displayed by OLED (detailed tutorial)
Combining strings and numbers using ssstream
Ctrip reshapes new Ctrip
JSON and protobuf Any interchange
Shell command notes
Matplotlib drawing Chinese garbled code
移动IPv6光猫登录的一般ip地址账号与密码,移动光猫变桥接模式
Day 1 of the 10 day smart lock project (understand the SCM stm32f401ret6 and C language foundation)
Implementation and design of JMeter interface test database assertion for CSDN salary increase technology
What is solid angle
什么是立体角
General IP address, account and password of mobile IPv6 optical cat login, and mobile optical cat is in bridging mode
The scientific innovation board successfully held the meeting, and the IPO of Kuangshi technology ushered in the dawn