if(n==1)//插入第一个位置
{h=head;//h指向头结点
head=NULL;//头结点赋空
p->next=h;//如果插入第一个位置,指针h赋值给P指针域
head=p; //头结点指向p
}
else
{s=head;//头指针给S指针
for(i=1;i
p->next=s->next; //P指针域指向S指针域,即查找到的S->next指向的空间
s->next=p;//S指针域指向新分配的P指针的空间
}
s->next = p->next ;
p->next = s;
t = p->data;
p->data =s->data;
s->data =t;
s->next = p->next;
p->next = s;
22222222!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!