?? 5-2.c
字號:
#include <stdio.h>
#define N 10
typedef char datatype;
typedef struct node{
datatype data;
struct node *next;
} listnode;
typedef listnode *linklist;
listnode *p;
linklist createlist(int n)
{
int i;
linklist head;
listnode *p;
head=NULL;
for(i=n;i>0;--i)/*指定長度為n,插入次數受限制*/
{
p=(listnode*)malloc(sizeof(listnode));
scanf("%d",&p->data);
p->next=head;
head=p;
}
return(head);
}
main()
{
linklist newlist=createlist(N);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -