1) 通讯录的基本信息:姓名、年龄和联系电话;
2) 具有新建、删除和查询功能等。
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
struct friends_list{
char name[50];
char age[10];
char phone[50];
};
struct friends_list friends[50];
typedef struct{
struct friends_list friends[50];
int length;
}SqList;
SqList L;
int create(SqList *L)
{
(*L).length=0;
printf("创建成功!\n\n");
return 1;
}
int add(SqList *L)
{
int i=1,a;
while(i>0&&i<=50)
{
printf("姓名:");
scanf("%s",(*L).friends[i-1].name);
printf("\n年龄:");
scanf("%s",(*L).friends[i-1].age);
printf("\n电话:");
scanf("%s",(*L).friends[i-1].phone);
&n