当前位置:网站首页>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;
}
}边栏推荐
- I use these six code comparison tools
- A label making navigation bar
- Comment mettre en place une équipe technique pour détruire l'entreprise?
- 172. Zero after factorial
- A label colorful navigation bar
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Binary tree traversal - middle order traversal (golang)
- Runc hang causes the kubernetes node notready
- PHP 基础篇 - PHP 中 DES 加解密详解
- PowerShell:在代理服务器后面使用 PowerShell
猜你喜欢

Introduce reflow & repaint, and how to optimize it?

The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety

Kibana installation and configuration

官宣!第三届云原生编程挑战赛正式启动!

Traditional chips and AI chips

R language uses logistic regression and afrima, ARIMA time series models to predict world population

Five ways to query MySQL field comments!

Video display and hiding of imitation tudou.com

Unpool(nn.MaxUnpool2d)

One plus six brushes into Kali nethunter
随机推荐
Include rake tasks in Gems - including rake tasks in gems
Phpstrom setting function annotation description
Interpretation of mask RCNN paper
流批一體在京東的探索與實踐
MySQL regexp: Regular Expression Query
如何搭建一支搞垮公司的技术团队?
Win:使用组策略启用和禁用 USB 驱动器
[Digital IC hand tearing code] Verilog edge detection circuit (rising edge, falling edge, double edge) | topic | principle | design | simulation
Valentine's Day flirting with girls to force a small way, one can learn
CAM Pytorch
Go RPC call
STL container
Codeforces Global Round 19 ABC
PowerShell: use PowerShell behind the proxy server
Li Kou Jianzhi offer -- binary tree chapter
runc hang 导致 Kubernetes 节点 NotReady
Summary and practice of knowledge map construction technology
Redis' hyperloglog as a powerful tool for active user statistics
The application and Optimization Practice of redis in vivo push platform is transferred to the end of metadata by
Matrixone 0.2.0 is released, and the fastest SQL computing engine is coming