线性表的定义和基本操作

一、线性表的定义
二、线性表的基本操作
对于引用“&”:
(1)没有用“&”
#include <stdio.h>
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);
}
(2)用“&”
#include <stdio.h>
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);
}