请各位高手帮我看看
//实现数据结构顺序表的初始化、插入、输出#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#define TRUE 1
#define FALSE 0
#define MAXSIZE 100
typedef int ElemType;
typedef struct{
ElemType *elem;
int length;
}sqlist;
int initsqlist(sqlist *L){
L->elem=(ElemType*)malloc(MAXSIZE*sizeof(ElemType));
if(L->elem==0)
return FALSE;
else
{L->length=0;
return TRUE;
}
}
int insertsqlist(sqlist *L,int i,ElemType x)
{
ElemType *p=L->length-1+L->elem;
if(i<=0 || i>=length+1)
return FALSE;
if(L->length>=MAXSIZE-1)
return FALSE;
for(;p>=L->elem+i-1;p--)
*(p+1)=*p;
*(p+1)=x;
L->length++;
return TRUE;
}
void display(sqlist L)
{
ElemType *p=L->elem;
for(;p<=L->elem+L->length;p++)
printf("%d",*p);
}
int main()
{
ElemType x;int i;sqlist *L;
if(initsqliist(*l)==0)
return FALSE;
else
{
scanf("%d%d",&i,&x);
while(x!=1000){
insertsqlist(*L,i,x);
scanf("%d%d",&i,&x);
}
}
return 0;
}