当前位置:网站首页>Start the remedial work. Print the contents of the array using the pointer
Start the remedial work. Print the contents of the array using the pointer
2022-07-05 02:06:00 【Xiao Sun's code sharing】
Write a function to print arr Contents of array , Do not use array subscripts , Use the pointer .
arr Is an integer one-dimensional array .
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int arr[] = {1,2,3,4,5,6,7,8,9};
int* p = arr;// Defining pointer variables
int len = sizeof(arr) / sizeof(arr[0]);// Calculate the length of the array
for (int i = 0; i <len; i++)
{
printf("%d\n", *p);
++p;
}
}
边栏推荐
- Unpool(nn.MaxUnpool2d)
- Grub 2.12 will be released this year to continue to improve boot security
- Talk about the things that must be paid attention to when interviewing programmers
- Grpc message sending of vertx
- Missile interception -- UPC winter vacation training match
- pytorch fine-tuning (funtune) : 镂空设计or 偷梁换柱
- Introduce reflow & repaint, and how to optimize it?
- PHP Joseph Ring problem
- 如何搭建一支搞垮公司的技術團隊?
- Unified blog writing environment
猜你喜欢
增量备份 ?db full
One plus six brushes into Kali nethunter
PHP wechat official account development
A label colorful navigation bar
Three properties that a good homomorphic encryption should satisfy
流批一體在京東的探索與實踐
How to build a technical team that will bring down the company?
Exploration of short text analysis in the field of medical and health (II)
Application and Optimization Practice of redis in vivo push platform
Mysql database | build master-slave instances of mysql-8.0 or above based on docker
随机推荐
Include rake tasks in Gems - including rake tasks in gems
Application and development trend of image recognition technology
Variables in postman
Summary and practice of knowledge map construction technology
MySQL backup and recovery + experiment
Restful Fast Request 2022.2.1发布,支持cURL导入
Three properties that a good homomorphic encryption should satisfy
220213c language learning diary
I use these six code comparison tools
187. Repeated DNA sequence - with unordered_ Map basic content
Use the difference between "Chmod a + X" and "Chmod 755" [closed] - difference between using "Chmod a + X" and "Chmod 755" [closed]
PHP Basics - detailed explanation of DES encryption and decryption in PHP
85.4% mIOU! NVIDIA: using multi-scale attention for semantic segmentation, the code is open source!
Traditional chips and AI chips
[技术发展-26]:新型信息与通信网络的数据安全
Timescaledb 2.5.2 release, time series database based on PostgreSQL
Rabbit MQ message sending of vertx
Interpretation of mask RCNN paper
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
STM32 series - serial port UART software pin internal pull-up or external resistance pull-up - cause problem search