用鍊錶做的簡單c語言學生管理系統

2021-09-30 13:35:39 字數 1414 閱讀 1506

用鍊錶做的簡單c語言學生管理系統

裡面有用到簡單的檔案操作

#include #include struct stu

;struct stu *creatlink_t();//建立鍊錶

void typelink_t(struct stu * phead);//列印裡面的內容

struct stu *charulink_t(struct stu * phead);//在裡面插入新的內容

struct stu *detelelink_t(struct stu * phead);//刪除裡面的內容

void chocklink_t(struct stu * phead);//搜尋想要列印的節點

int choice();

int main()

}}int choice() /*選單*/

struct stu *creatlink_t()

else

}p->next=null;

fclose(fp);

return phead;

}void chocklink_t(struct stu * phead)

struct stu *p;

int n;

int i;

printf("請輸入要查詢的學號\n");

scanf("%d",&n);

p=phead;

while((p->num!=n)&&(p->next!=null))

if(n==p->num)

else

printf("查無此人\n");

fclose(fp);

}void typelink_t(struct stu * phead)

else

p=phead;

while(p!=null)

fclose(fp);

}struct stu *charulink_t(struct stu * phead)

pf=phead;

while(p->num >pf->num && pf->next!=null)

if(p->num < pf->num)

else

}else

//return phead;

}struct stu *detelelink_t(struct stu * phead)

else

p=phead;

while(p->num!=n&&p->next!=null)

if(p->num==n)

else

pt->next=p->next;

free(p);

}else

printf("該鍊錶沒有此節點");

//typelink_t(phead);

}

C語言學生管理系統(鍊錶以及檔案操作)

include include include struct student void getinformation struct student human void addinformation struct student head void printfinformation struct ...

C語言用鍊錶實現學生管理系統

功能 1.設計儲存學生資訊的鍊錶 2.可隨時新增學生資訊,將新加入的學生資訊按學號順序新增到鍊錶中 3.設計遍歷輸出函式 3.設計查詢函式,根據學號查詢或姓名查詢 5.可隨時刪除學生資訊,根據學號刪除 include stdio.h include stdlib.h typedef struct s...

用C語言實現簡單的學生資料庫管理系

p2 next p1 printf 學生 d新增成功 n num return p2 p2 next void del student struct student head printf 請輸入要刪除學生的學號 scanf d num char name 10 while p2 if p2 nex...