当前位置:网站首页>What parameters should be passed in calling integer or character array functions
What parameters should be passed in calling integer or character array functions
2022-07-28 19:35:00 【nine thousand six hundred and seventy-seven】
- Say first conclusion
// Experimental array , Whether it's a character array or an array
// At call time , Is to pass in the array address
// The function parameter of the call can be int A ,int A[ ]
//int A[ ] This is because the array name is the first address of the array
// The pointer type is int, A pointer refers to an address
// At the same time, you can write fun(A)
// or fun(&A[1]) What's going on here is The address of the second array element
// The same goes for character arrays , The following is a running example - The following is the running result of each code
#include"stdio.h"
void fun(int A[]){
for(int i=0;i<3;i++)
printf("%d\n",A[i]);
}
int main(){
int A[3]={
1,2,3};
fun(&A[1]);
return 0;
}






边栏推荐
- China's first chip stamp released: built-in 120um ultra-thin NFC chip
- Get to know nodejs for the first time (with cases)
- shared_ PTR and make_ Use of shared
- After reading the thesis for three years, I learned to read the abstract today
- Avoidance Adjusted Climbrate
- SaltStack系统初始化
- My second blog - C language
- idea properties文件显示\u不显示中文的解决
- ES6 new - arrow function
- 助力面板行业创新,FPGA将成屏厂TCON最佳选择?
猜你喜欢

在矩池云快速安装torch-sparse、torch-geometric等包

navicate修改数据库名的方式

Cell综述:人类微生物组研究中的单细胞方法

BLDC 6-step commutation simulink

智能合约安全——溢出漏洞

彻底理解位运算——与(&)、非(~)、或(|)、异或(^)

NDK series (5): from introduction to practice, JNI explodes the liver and explains everything in detail!

source insight项目导入和使用教程

NDK 系列(5):JNI 从入门到实践,爆肝万字详解!

英文翻译葡萄牙语-批量英文转换葡萄牙语-各种语言免费互译转换
随机推荐
[solved] ac86u ml revision firmware virtual memory creation failed, prompting that the USB disk reading and writing speed does not meet the requirements
Pandownload revival tutorial
Pytorch:快速求得NxN矩阵的主对角线(diagonal)元素与非对角线元素
ES6 conversion of new data type set and arr set map
Getting started with saltstack
11、 学习MySQL UNION 操作符
JS preventDefault() 键盘输入限制 onmousewheel stopPropagation停止事件传播
Cvpr21 unsupervised anomaly detection cutpaste:self supervised learning for anomaly detection and localization
微信公众号授权登录后报redirect_uri参数错误的问题
Avoidance Adjusted Climbrate
Streamlit machine learning application development tutorial
以数字化转型为契机,3C企业如何通过SRM供应商云协同平台实现高效协同?
峰值速率超2Gbps!高通在中国首发通过5G毫米波MIMO OTA测试
SaltStack系统初始化
Avoidance Adjusted Climbrate
Adobe Flash player 34.0.0.92 and available version modification methods (2021-01-23
Rust Getting Started Guide (rustup, cargo)
WPF implements MessageBox message prompt box with mask
业务可视化-让你的流程图“Run“起来(4.实际业务场景测试)
Share several coding code receiving verification code platforms, which will be updated in February 2022