以下程序运行后输出结果的第一行为________,第二行为________,第三行为_________
#include<stdio,h>
#include<stdlib.h>
struct node
{ char data;struct node *next;};
struct node *insert(struct node *h,char c)
{ struct node *p,*p1,*p2;
p=(struct node *)malloc(sizeof(struct node)); p->data=c;p->next=NULL;
if(h==NULL)h=p;
else
{ p1=p2=h;
while(c>p1->data&&p1->next!=NULL) { p2=p1;p1=p1->next;}
if(c<=p1->data)
if(p1==h) { p->next=h;h=p;}
else { p2->next=p;p->next=p1;}
else { p1->next=p;}
}
return h;
}
struct node *del(struct node *h)
{
struct node *p=h;
while(p!=NULL)
{ if(p->data%2==0) p->next=p->next->next;
p=p->next;
}
return h;
}
void printf(struct node *h)
{ struct node *p=h;
while(p!=NULL)
{ printf("%c",p->data); p=p->next;
printf("\n");
}
void main()
{ struct node *head=NULL; char *item="32659",*p=item;
puts(item);
while(*p) head=insert(head,*p++);
print(head); del(head); print(head);
}
答案是32659
23569
256