数据结构01 线性表

cpp 复制代码
#include<stdio.h>

/*
如果没有使用&符 
void test(int  x){
*/
void test(int & x){
	x = 1024;
	printf("test函数内部 x = %d\n", x);
	
	
} 
int main(){
	int x = 1;
	printf("调用test前 x = %d\n", x);
	test(x);
	printf("调用test后 x = %d\n", x);
}

没有&

有&

相关推荐
Navigator_Z20 小时前
LeetCode //C - 1326. Minimum Number of Taps to Open to Water a Garden
c语言·算法·leetcode
XW9632581 天前
除湿机行业组织能力与人才地图报告
大数据·服务器·网络·数据结构·数据库·人工智能
geats人山人海1 天前
算法基础第六讲 图论
算法·深度优先·图论
风落青芜1 天前
排序算法(四):归并排序、计数排序与算法总结
c语言·开发语言·数据结构·算法·排序算法
@陈小鱼1 天前
基于InceptionTime网络的PPG无创血压估计算法研究
人工智能·python·算法·回归·开源·ppg·血压估计
老师我太想进步了20262 天前
【数据结构-15】实现链式结构二叉树
c语言·数据结构
liulilittle2 天前
认识麻将 —— 流水及对账
算法·游戏·lua·对账·流水·资金·玩法
xiangxueCode2 天前
数据结构:容器适配器之优先级队列
数据结构·优先级队列
鱼很腾apoc2 天前
【Redis】第2期 详解Redis五大数据结构:命令+C++实现、渐进式遍历与数据库管理
linux·服务器·c语言·数据结构·c++·redis·学习