废话不说,直接跟上以前的代码,写出打印函数来。

void print(struct student *head)
{
struct student *p;
printf(“\n these %d records are:\n”,n);
p = head;
if(head != NULL)
do
{
printf(“%ld %f\n”,p->num,p->score);
p = p->next;
}while(p != NULL);
}

很简单,效果跟上一篇一样,那个也是通过这个函数打印出来的,

请关注 断肠人空间