合并两条单链表代码(C语言版).docxVIP

  • 0
  • 0
  • 约1.54千字
  • 约 4页
  • 2020-04-13 发布于湖南
  • 举报
#include iostream #includestdio.h #includemalloc.h #define ERROR 0; #define OK 1; #define ElemType int; typedef int Status; typedef struct LNode { int data; struct LNode *next; }LNode,*LinkList; int CreateLink_L(LinkList L,int n) { LinkList p,q; int i; int e; L=(LinkList)malloc(sizeof(LNode)); L-next=NULL; q=(LinkList)malloc(sizeof(LNode)); q=L; for(i=0;in;i++) { scanf(%d,e); p=(LinkList)malloc(sizeof(LNode)); p-data=e; p-next=q-next; q-next=p; q=q-next; } return OK; } int LoadLink_L(LinkList L)

文档评论(0)

1亿VIP精品文档

相关文档