文件名称:shunxu
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.18kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
//顺序表的建立、查找、插入与删除
#include <stdio.h>
#include <malloc.h>
#include <stdlib.h>
#define ListSize 100 //表最大长度
//结构定义
typedef struct SeqList
{
int node[ListSize] //存放表结点
int length //当前表长度
} SeqList
//插入元素
insertList(SeqList *list, int e)
{
int i=list->length-1 //先将i指定为最后一项
if(i>=ListSize-1) //表已经达到最大长度ListSize
{
printf("表已满,不能增加新的项!\n")
-//The order of table creation, search, insert and delete# Include <stdio.h># Include <malloc.h># Include <stdlib.h># Define ListSize 100// maximum length of table// structure definition typedef struct SeqList (int node [ListSize]// store table Node int length// length of the current table) SeqList// insert elements insertList (SeqList* list, int e) (int i = list-> length-1// first will i designated as the last if (i> = ListSize-1)// table has reached the maximum length ListSize (printf ( table is full, can not add new items! )
#include <stdio.h>
#include <malloc.h>
#include <stdlib.h>
#define ListSize 100 //表最大长度
//结构定义
typedef struct SeqList
{
int node[ListSize] //存放表结点
int length //当前表长度
} SeqList
//插入元素
insertList(SeqList *list, int e)
{
int i=list->length-1 //先将i指定为最后一项
if(i>=ListSize-1) //表已经达到最大长度ListSize
{
printf("表已满,不能增加新的项!\n")
-//The order of table creation, search, insert and delete# Include <stdio.h># Include <malloc.h># Include <stdlib.h># Define ListSize 100// maximum length of table// structure definition typedef struct SeqList (int node [ListSize]// store table Node int length// length of the current table) SeqList// insert elements insertList (SeqList* list, int e) (int i = list-> length-1// first will i designated as the last if (i> = ListSize-1)// table has reached the maximum length ListSize (printf ( table is full, can not add new items! )
(系统自动生成,下载前可以参看下载内容)
下载文件列表
shunxu.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.