当前位置:网站首页>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;
}






边栏推荐
- Nokia expands its 5g agreement with BT and will become its largest wireless access device supplier
- Cell综述:人类微生物组研究中的单细胞方法
- 【笔记】《结网:互联网产品经理改变世界》
- How openocd directly downloads programs to STM32 board through stlink (solved)
- Srs4.0 installation steps
- shared_ PTR and make_ Use of shared
- NDK series (5): from introduction to practice, JNI explodes the liver and explains everything in detail!
- WPF 实现带蒙版的 MessageBox 消息提示框
- OpenOCD如何通过stlink直接下载程序到stm32板子(已解决)
- Rust 入门指南(crate 管理)
猜你喜欢

用于异常检测的Transformer - InTra《Inpainting Transformer for Anomaly Detection》

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

source insight项目导入和使用教程

adb remount of the / superblock failed: Permission denied

OpenOCD如何通过stlink直接下载程序到stm32板子(已解决)

Business visualization - let your flowchart "run" (4. Actual business scenario test)

Swing事件处理的过程是怎样的?

彻底理解位运算——左移、右移

调用整数或字符数组函数里的参数应该传入啥

使用百度EasyDL实现明厨亮灶厨师帽识别
随机推荐
以数字化转型为契机,3C企业如何通过SRM供应商云协同平台实现高效协同?
使用SaltStack自动化部署Zabbix
Test Development Notes
Rust Getting Started Guide (rustup, cargo)
NPM installing and uninstalling global packages
2022年全国最新消防设施操作员(中级消防设施操作员)题库及答案
redis 主从架构(sizeof函数怎么计算)
文章翻译软件-批量免费翻译软件支持各大翻译接口
WPF 实现带蒙版的 MessageBox 消息提示框
Iclr21 (classification) - future classic "vit" an image is worth 16x16 words (including code analysis)
App自动化测试是怎么实现H5测试的
VAE: understanding and implementation of variational self encoder
Jestson nano Object detection
Pytorch:快速求得NxN矩阵的主对角线(diagonal)元素与非对角线元素
Streamlit machine learning application development tutorial
智能合约安全——溢出漏洞
JS 批量添加事件监听onclick this 事件委托 target currentTarget onmouseenter onmouseover
BLDC 6-step commutation simulink
Redis master-slave architecture (how to calculate sizeof function)
使用SaltStack自动化部署LNMP