单链表的查找程序.docVIP

  • 3
  • 0
  • 约1.88千字
  • 约 3页
  • 2019-02-12 发布于北京
  • 举报
单链表的查找程序.doc

单链表的查找,程序如下: #includestdio.h #includeconio.h #includemalloc.h typedef struct node { int data; struct node *next; }LinkList; LinkList *CreateList(int length) { LinkList *head,*p,*q; head=(LinkList*)malloc(sizeof(node)); head-next =NULL; q=head; printf(******请输入链表中的%d个元素:\n,length); for(int i=1;i=length;i++) { p=(LinkList*)malloc (sizeof(node)); q-next=p; p-next=NULL; q=q-next ; scanf(%d,p-data); } return head; } void select_insert(LinkList

文档评论(0)

1亿VIP精品文档

相关文档