- 13
- 0
- 约1.91千字
- 约 6页
- 2019-12-16 发布于广东
- 举报
数据结构实验报告
实验名称:队列的练习操作评分:专业:信管财会 班级:一班小组编号:三组
实验名称:
队列的练习操作
评分:
专业:信管财会 班级:一班
小组编号:三组
实验内容:
采用链式存储实现队列的初始化、入队、出队等操作。。
实验目的:
能够熟练操作队列的初始化,及入出队。
实验源程序:(源程序必须调试通过;需有必要的注释;源程序可打印,附在本实 验报告之后。)
#include〈stdio.h
^include stdlib. h
#define
STACKINCREMENT 10
#define
STACK INIT SIZE 100
#define
OK 1
#defi ne
ERROR 0
#defi ne
INFEASIBLE -1
#define
OVERFLOW -2
typedef
int QElemType;
typedef
int Status;
typedef struct QNode{
QElemType data;
struct QNode * next.;
}QNode, *QueuePtr;
typedef struct{
QueuePtr front;
QueuePtr rear;
}LinkQueue;
Status InitQueue (LinkQueue Q) {
〃构造一个空队列Q
Q. front = (QueuePtr) mall
原创力文档

文档评论(0)