⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 5-2.c

📁 含有大量数据结构的源代码 请大家漫漫品味
💻 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 + -