当前位置:网站首页>C language_ Structure pointer to access structure array
C language_ Structure pointer to access structure array
2022-07-26 13:54:00 【Linux siege lion】
Structure pointer to access structure array
01—— Subscript traversal array



Previously, we used the subscript method to access this structure array , In fact, you can also use pointers to traverse the structure array .
02—— Pointer traversal array



A structure pointer variable is defined to store the first address of the array

We know that the array name is the first address of the array
for example :
When the program needs to repeatedly call the pointer to traverse the array loop , Will it output normally this time ?

You can see that it will not output normally , as a result of : When the program needs to repeatedly call the pointer to traverse the array loop, an error will occur , Will cause the array to go out of bounds !!!
If you want to call more than once , Before each call, point the pointer variable to the first address of the array :


That way there won't be any mistakes .
边栏推荐
- Zhou Wei: look for non consensual investment opportunities to accompany the founding team that delays satisfaction
- 421. 数组中两个数的最大异或值
- Large and small end mode
- Parent class reference to child class (parent class reference points to child class object)
- Photoshop (cc2020) unfinished
- Redis learning notes
- 聚力打造四个“高地”,携手合作伙伴共铸国云!
- The serialization class in unity is in JSON format
- 【OAuth2】八、OAuth2登录的配置逻辑-OAuth2LoginConfigurer和OAuth2ClientConfigurer
- Official announcement! Edweisen group and Baidu xirang reached a deep co creation cooperation
猜你喜欢

WPS凭什么拒绝广告?

How to quickly design a set of cross end components that support rendering rich text content

重押海外:阿里、京东、顺丰再拼“内力”

The serialization class in unity is in JSON format
![[collection of topics that C language learners must know 1] consolidate the foundation and steadily improve](/img/95/bec94176cadfac112585df259156c9.png)
[collection of topics that C language learners must know 1] consolidate the foundation and steadily improve

Plato Farm有望通过Elephant Swap,进一步向外拓展生态

"Intermediate and advanced test questions": what is the implementation principle of mvcc?

Docker swarm cluster builds highly available MySQL active and standby

Use the requests library to crawl web pages

Digital collections accelerate the breaking of the circle and help the industry find new opportunities
随机推荐
Win11+vs2019 configuration yolox
云智技术论坛工业专场 明天见!
Pytorch学习笔记(一)安装与常用函数的使用
The serialization class in unity is in JSON format
The.Net webapi uses groupname to group controllers to render the swagger UI
421. Maximum XOR value of two numbers in the array
Add a display horizontal line between idea methods
消息的订阅和发布
Tianyi cloud web application firewall (edge cloud version) supports the detection and interception of Apache spark shell command injection vulnerabilities
LCL three-phase PWM rectifier (inverter)
Tdsql-c serverless: help start-ups achieve cost reduction and efficiency increase
redis学习笔记
【OAuth2】八、OAuth2登录的配置逻辑-OAuth2LoginConfigurer和OAuth2ClientConfigurer
Upload pictures to get width and height
Tianjin emergency response Bureau and central enterprises in Tianjin signed an agreement to deepen the construction of emergency linkage mechanism
图书下载 | 2022年《终身监督学习导论》Meta AI、CMU等学者合著,171页PDF
官宣!艾德韦宣集团与百度希壤达成深度共创合作
JS, e.pagex, pagey modal box drag
POM文件详解
C语言_结构体指针来访问结构体数组