学渣还有个问题要问你#include#define MaxSize 100typedef int DataType;typedef struct{\x05int list[MaxSize];\x05int size;}Seqlist;void ListInitiate(Seqlist *L){\x05L->size=0;}int ListInsert(Seqlist *L,int i,int x){\x05int j;\x05for(j=L->size;j

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 19:00:26
学渣还有个问题要问你#include#defineMaxSize100typedefintDataType;typedefstruct{\x05intlist[MaxSize];\x05intsize

学渣还有个问题要问你#include#define MaxSize 100typedef int DataType;typedef struct{\x05int list[MaxSize];\x05int size;}Seqlist;void ListInitiate(Seqlist *L){\x05L->size=0;}int ListInsert(Seqlist *L,int i,int x){\x05int j;\x05for(j=L->size;j
学渣还有个问题要问你
#include
#define MaxSize 100
typedef int DataType;
typedef struct
{
\x05int list[MaxSize];
\x05int size;
}Seqlist;
void ListInitiate(Seqlist *L)
{
\x05L->size=0;
}
int ListInsert(Seqlist *L,int i,int x)
{
\x05int j;
\x05for(j=L->size;j>i;j--)
\x05\x05L->list[j]=L->list[j-1];
\x05L->list[i]=x;
\x05L->size++;
\x05return 1;
}
int ListDelete(Seqlist *L,int i,int *x)
{
\x05int j;
\x05*x=L->list[i];
\x05for(j=i+1;jsize-1;j++)
\x05\x05L->list[j-1]=L->list[j];
L->size--;
return 1;
}
int ListGet(SeqList *L,int i,int *x)
{
\x05*x=L.list[i];
\x05return 1;
}
void main(void)
{
\x05SeqList myList;
\x05int i,x;
\x05ListInitiate(&mylist);
\x05for(i=0;i

学渣还有个问题要问你#include#define MaxSize 100typedef int DataType;typedef struct{\x05int list[MaxSize];\x05int size;}Seqlist;void ListInitiate(Seqlist *L){\x05L->size=0;}int ListInsert(Seqlist *L,int i,int x){\x05int j;\x05for(j=L->size;j
什么问题.写明一下