填空题
下面函数将指针p2所指向的线性链表串接到p1所指向的链表的末端。假定p1所指向的链表非空。请填空。
#define NULL 0
struct link
float a;
struct link *next;
;
concatenate (p1,p2)
struct list *p1,*p2;
if(p1->next==NULL)
p1->next=p2;
else
concatenate(______,p2);
【参考答案】
p1->next
热门
试题
填空题
以下程序的运行结果是______。 # include <string.h> typedef struct student char name[10]; long sno; float score; STU; main() STU a= Tianjin ,2001,95 ,b= Shanghai ,2002,90, c= Han’gu ,2003,95),d,*p=&d; d=a; if(strcmp(a.name,c.name)>0) d=c; if(strcmp(b.name,d.name)>0) d=b; printf( %1d% s n ,d.sno,p->name);