#include<stdio.h>
#include<stdlib.h>
typedef struct linklist
{
char ff;
struct linklist *next;
}Node;
typedef Node* Linklist;
int main()
{
Linklist L, new;
L = (Linklist)malloc(sizeof(Node));
L->next = NULL;
int i;
for(i = 0; i < 26; i++)
{
new = (Linklist)malloc(sizeof(Node));
new->ff = 'a' + i;
new->next = L->next;
L->next = new;
}
while(L->next)
{
printf("%c ", L->next->ff);
L = L->next;
}
printf("\n");
return 0;
}
单链表的建立,把a~z 26个字母插入到链表中,并且倒叙,还要打印
最新推荐文章于 2021-11-26 16:13:15 发布