求哪位高手可以解答一下啊
#include "stdio.h"
#include "stdlib.h"
#define T sizeof( struct node)
struct node
{ char data;
struct node *next;
};
struct node *l( )
{
char x;
struct node *p,*h,*l;
l=(struct node*)malloc(T);
l->next=NULL;
h=l;
scanf("%c",&x);
while(x!='&')
{ p=(struct node *)malloc(T);
p->data=x;
p->next=h->next;
h->next=p;
h=p;
scanf("%c",&x);
}
return l;
}
void outlin(struct node *l)
{ struct node *p;
p=l->next;
while(p!=NULL)
{ printf("%c",p->data);
p=p->next;
}
}
void shanchu(struct node *l,int y)
{ struct node *p,*s;
int i; i=0;
p=l->next;
while (i!=y-2&&p->next!=NULL)
{ i++;
p=p->next;
}
if(i==y-1)
{
s=p->next;
p->next=s->next;
free(s);
}
printf("找不到这位!!");
}
main()
{ struct node*q;
int a;
q=l();
scanf("%d",&a);
shanchu(q,a);
outlin(q);
}