当前位置:网站首页>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;
}
}边栏推荐
- Practical case of SQL optimization: speed up your database
- Application and development trend of image recognition technology
- Yyds dry inventory swagger positioning problem ⽅ formula
- Logstash、Fluentd、Fluent Bit、Vector? How to choose the appropriate open source log collector
- Win:将一般用户添加到 Local Admins 组中
- Matrixone 0.2.0 is released, and the fastest SQL computing engine is coming
- What is the length of SHA512 hash string- What is the length of a hashed string with SHA512?
- Action News
- A label colorful navigation bar
- Chinese natural language processing, medical, legal and other public data sets, sorting and sharing
猜你喜欢

Runc hang causes the kubernetes node notready

Application and Optimization Practice of redis in vivo push platform

Icu4c 70 source code download and compilation (win10, vs2022)

Unpool(nn.MaxUnpool2d)

Interesting practice of robot programming 16 synchronous positioning and map building (SLAM)
![[source code attached] Intelligent Recommendation System Based on knowledge map -sylvie rabbit](/img/3e/ab14f3a0ddf31c7176629d891e44b4.png)
[source code attached] Intelligent Recommendation System Based on knowledge map -sylvie rabbit

Introduce reflow & repaint, and how to optimize it?

Five ways to query MySQL field comments!

Tucson will lose more than $400million in the next year

PowerShell: use PowerShell behind the proxy server
随机推荐
Process scheduling and termination
How to make a cool ink screen electronic clock?
Codeforces Round #770 (Div. 2) ABC
Visual explanation of Newton iteration method
流批一体在京东的探索与实践
MySQL backup and recovery + experiment
STL container
Tla+ through examples (XI) -- propositional logic and examples
Win:使用 PowerShell 检查无线信号的强弱
Three properties that a good homomorphic encryption should satisfy
MATLB | multi micro grid and distributed energy trading
MATLB|多微电网及分布式能源交易
Do you know the eight signs of a team becoming agile?
Vulnstack3
Talk about the things that must be paid attention to when interviewing programmers
I use these six code comparison tools
Visual studio 2019 set transparent background (fool teaching)
. Net starts again happy 20th birthday
MySQL REGEXP:正则表达式查询
Educational Codeforces Round 122 (Rated for Div. 2) ABC