![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 91
复习数据结构知识
下雨带伞
这个作者很懒,什么都没留下…
展开
-
数据结构-顺序表的基本操作(c语言)
数据结构中顺序表的增删改查基本操作:代码如下: #include <stdio.h> #include <stdlib.h> typedef struct Table{ int * head; int length; int size; }table; //初始化 void initTable(table *t,int size){ (*t).head=(int*)ma原创 2020-07-05 21:50:25 · 649 阅读 · 0 评论 -
c语言中结构体的值传递和地址传递的区别
通俗的来说,值传递只是把变量的值当做参数传递进子函数中,无论函数体中如何改变参数值,主函数的变量值都不会改变。而地址传递,是把变量的地址传入子函数中,子函数中对于参数的改变,是通过传入的地址参数去内存中修改该变量存储的值,所以主函数中的变量值也会同步改变。下面来演示一下c语言中如何改变结构体中的变量值: #include <stdio.h> #include <stdlib.h> typedef struct Table{ int * he原创 2020-07-05 01:06:46 · 4466 阅读 · 0 评论