请教关于链表的指针问题,
先将26个字母输入链表,再从链表中取出,取出指针怎么指向?
#include "stdio.h"
#include "malloc.h"
struct node
{
int date;
struct node *next;
};
main()
{
struct node *p;
char c;
for(c=122;c>=98;c--)
{
p = (struct node *)malloc(sizeof(struct node));
printf("%d\n",sizeof(struct node));
p->date=c;
p=p->next;
}
p = (struct node *)malloc(sizeof(struct node));
p->date='a';
p->next=NULL;
for(c=122;c>=97;c--)
{
printf("%c",p->date);
p--;
}
}