用C語言編寫通訊錄

2021-05-23 01:00:29 字數 926 閱讀 1073

#include

#include

#define null 0

#define len sizeof(struct student)

struct student

;int n;

struct student*creat(void)

p2->next=null;

return(head);

}void print(struct student *head)

while(p!=null); }

struct student*del(struct student *head,long num)

p1=head;

while(num != p1->num && p1->next!=null)

if(num==p1->num)

else printf("%ld not been found!/n"

,num);

return(head);}

struct student*insert(struct student *head

,struct student *stud)

else

if(p0->num

<p1->num)

else

}n=n+1; 

return(head);}

main()

printf("/ninput the inserted record:")

;stu=(struct student

)malloc(len)

;scanf("%ld

,%f"

,&stu-

>num

,&stu-

>score)

;while(stu-

>num

!=0) }

C 編寫的通訊錄

通訊錄系統主要功能使用者的登入以及資料的維護。使用者登入 在資料庫裡設定user表,對具有使用者名稱和密碼的人方可訪問資料庫中其他資料。資料的維護 包括資料的查詢 新增 修改 刪除的功能,對資料庫中聯絡人進行各種操作。一 有較為美觀簡潔大方的選單,能保證使用者方便 直觀 快捷的熟悉並使用軟體的各項功...

通訊錄(C語言)

include include include define m 1000 結構體變數的大小 void insert 增加聯絡人資訊 int delet 刪除聯絡人資訊 void find 查詢指定聯絡人資訊 void change 修改聯絡人資訊 void show 顯示所有聯絡人資訊 void ...

C語言通訊錄

include include include typedef struct atnn 定義結構體 attn void menu 選單 void print attn attn at,int sz 顯示所有聯絡人資訊 void add attn attn at,int sz 新增聯絡人資訊 if s...