当前位置:网站首页>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;
}
}边栏推荐
- Introduce reflow & repaint, and how to optimize it?
- ICSI 311 Parser
- 流批一體在京東的探索與實踐
- Summary and practice of knowledge map construction technology
- Redis' hyperloglog as a powerful tool for active user statistics
- Win: use PowerShell to check the strength of wireless signal
- 如何搭建一支搞垮公司的技術團隊?
- Codeforces Round #770 (Div. 2) ABC
- Advanced learning of MySQL -- Application -- Introduction
- phpstrom设置函数注释说明
猜你喜欢

Win:使用 Shadow Mode 查看远程用户的桌面会话

流批一体在京东的探索与实践

R语言用logistic逻辑回归和AFRIMA、ARIMA时间序列模型预测世界人口

MySQL REGEXP:正则表达式查询

Exploration and Practice of Stream Batch Integration in JD

Express routing, express middleware, using express write interface
![[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

Application and Optimization Practice of redis in vivo push platform

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

phpstrom设置函数注释说明
随机推荐
Some query constructors in laravel (2)
Visual studio 2019 set transparent background (fool teaching)
[technology development-26]: data security of new information and communication networks
Luo Gu Pardon prisoners of war
Practice of tdengine in TCL air conditioning energy management platform
MySQL REGEXP:正则表达式查询
The application and Optimization Practice of redis in vivo push platform is transferred to the end of metadata by
Grub 2.12 will be released this year to continue to improve boot security
Summary of regularization methods
STM32 series - serial port UART software pin internal pull-up or external resistance pull-up - cause problem search
CAM Pytorch
PHP Basics - detailed explanation of DES encryption and decryption in PHP
Summary and practice of knowledge map construction technology
Win: add general users to the local admins group
Prometheus monitors the correct posture of redis cluster
Mysql database | build master-slave instances of mysql-8.0 or above based on docker
Yyds dry inventory swagger positioning problem ⽅ formula
Stored procedure and stored function in Oracle
Win: enable and disable USB drives using group policy
Official announcement! The third cloud native programming challenge is officially launched!