#include<stdio.h>
#include<stdlib.h>
struct link *AppendNode(struct link *head);
void DisplyNode(struct link *head);
void DeleteMemory(struct link *head);
struct link
{
int date;
struct link *next;
};
int main()
{
int i=0;
char c;
struct link *head=NULL;
printf(“Do you want to append a new node(Y/N)?”);
scanf("%c",&c);
while(c==‘Y’||c==‘y’)
{
head=AppendNode(head);
DisplyNode(head);
printf(“Do you want to append a new node(Y/N)?”);
scanf(" %c",&c);
i++;
}
动态存储
最新推荐文章于 2022-11-03 11:44:10 发布