Ŀ

գҪıйص䡣
ɸ-1Ϊ־Ҫݵһ
ʾ
庯struct stud_node *Creat_Stu_Doc()ɰݵ򴴽
ʾΪ˵
룺
1 2 3 4 5 6 7 -1

7 6 5 4 3 2 1



#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct stud_node{
	int num;
	struct stud_node *next;
};
struct stud_node *Creat_Stu_Doc();
void Ptrint_Stu_Doc(struct stud_node *head);
void main()
{
	struct stud_node *head;

	head=Creat_Stu_Doc();
	Ptrint_Stu_Doc(head);
}
/*---------*/
void Ptrint_Stu_Doc(struct stud_node *head)
{
	struct stud_node *ptr;
	if(head==NULL){
		printf("No Records\n");
		return;
	}
	for(ptr=head;ptr;ptr=ptr->next)
		printf("%d ",ptr->num);
	printf("\n");
}
