- 1
- 0
- 约6.93千字
- 约 12页
- 2019-03-14 发布于浙江
- 举报
实验1 ADT表的编程与实现
电工二
姓名:张德良
学号:201400121076
实验目的:加深对抽象数据类型ADT表的理解;
实验原理:参照课本p.44-49,及Figure3.6-3.13.
实验内容:编写程序实现ADT表的定义,及常用操作:
1)、判断表是否为空;
源程序
#include stdafx.h
#include stdio.h
#include stdlib.h
#include malloc.h
// 定义链表中的节点
typedef struct node
{
int member; // 节点中的元素
struct node *pNext; // 指向下一个节点的指针
}Node,*pNode;
// 函数声明
pNode CreateList(); // 创建链表函数
void TraverseList(pNode ); // 遍历链表函数
bool Is_Empty(pNode); // 判断链表是否为空
int main()
{
pNode pHead = NULL; // 定义初始化头节点
struct Node *pHead == NU
原创力文档

文档评论(0)