int num,i;
tail=(link)malloc(sizeof(node));
tail->next=NULL;
ptr=tail;
printf("\nplease input 5 data==>\n");
for(i=0;i<=4;i++)
{
scanf("%d",&num);
ptr->data=num;
head=(link)malloc(sizeof(node));
head->next=ptr;
ptr=head;
}
ptr=ptr->next;
while(ptr!=NULL)
{ printf("The value is ==>%d\n",ptr->data);
ptr=ptr->next;
}}
---------------------------------------------------------------------------------------------------------
http://www.qdxw.com.cn/yx/dwwf/2488671.html
http://www.lfxww.com/2014/shichangshangxun/2014/0423/839204.html
http://www.js0573.com/yx/jsfs/4444600.html
http://www.rznews.cn/yszx/stbk/5482712213.html
http://www.rznews.cn/yszx/stbk/5474504209.html
http://www.zznews.cn/hyzx/jkxx/5479137991.html
http://www.lfxww.com/2014/shichangshangxun/2014/0423/838907.html
http://www.zznews.cn/hyzx/jkxx/5479145838.html
http://www.rznews.cn/yszx/stbk/5474508372.html
http://www.lfxww.com/2014/shichangshangxun/2014/0423/839204.html
http://www.zznews.cn/hyzx/jkxx/5479155001.html
http://www.rznews.cn/yszx/stbk/5474988677.html
http://www.lfxww.com/2014/shichangshangxun/2014/0423/837559.html
http://www.zznews.cn/hyzx/jkxx/5451672959.html
http://www.js0573.com/yx/jsfs/4444600.html
http://www.lfxww.com/2014/shichangshangxun/2014/0423/838602.html
http://www.zznews.cn/hyzx/jkxx/5451688330.html
http://www.rznews.cn/yszx/stbk/5482712213.html
http://www.lfxww.com/2014/shichangshangxun/2014/0423/838647.html
http://www.zznews.cn/hyzx/jkxx/5451690985.html
http://www.js0573.com/yx/jsfs/4444524.html
http://www.zznews.cn/hyzx/jkxx/5451728897.html
http://www.qdxw.com.cn/yx/dwwf/2488671.html
【程序74】
题目:连接两个链表。
1.程序分析:
2.程序源代码:
#include "stdlib.h"
#include "stdio.h"
struct list
{ int data;
struct list *next;
};
typedef struct list node;
typedef node *link;
link delete_node(link pointer,link tmp)
{if (tmp==NULL) /*delete first node*/