我要链式学生管理系统,结构体是姓名,学号,一个成绩,要实现插入,查找,删除,修改,谢谢了

来源:百度知道 编辑:UC知道 时间:2024/05/12 14:01:56
用C语言写的

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

struct stud
{
long num;
char name[20];
double score;
};

typedef struct stucode
{
struct stud student ;
struct stucode *next;
}L;

void menu();
void createlist(struct stucode **r);
void out(struct stucode *r);
void search1(struct stucode *r);
void search2(struct stucode *r);
void del(struct stucode **r);
void insert(struct stucode **r);
void sort(struct stucode **r);

void main()
{
char choose;
int flag=1;
struct stucode *r=NULL;

while(flag)
{
system("cls");
menu();
choose=getchar();
switch(choose)
{
case '1':
createlist(&r);
out(r);
printf("Testing function 1\nPress any key to continue\n");
getchar();