C语言求助,帮忙注解一下下面一段程序(急)

来源:百度知道 编辑:UC知道 时间:2024/05/26 15:53:28
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct addr
{
char name[30];
char address[40];
char code[20];
char tel[11];
struct addr *next;
}record;

struct addr *head,*start;
struct addr *last;

int menu_select();
void enter();
void deleted();
void search();

void main()
{
char s[80],choice;
struct addr *info;
start=last=NULL;

switch(menu_select())
{
case 1:enter();
break;
case 2:deleted();
break;
case 3:search();
break;
case 4:exit(0);
}
}

int menu_select()
{
char s[80];
int c;
printf("1__Enter a name&#

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

struct addr
{
char name[30];
char address[40];
char code[20];
char tel[11]; //以上为结构体的成员列表
struct addr *next;//结构体指针
}record;//结构体变量名

struct addr *head,*start;
struct addr *last;

int menu_select();
void enter();
void deleted();
void search();

void main()
{
char s[80],choice;
struct addr *info;
start=last=NULL;

switch(menu_select()) //根据menu_select()) 的值选择运行下边的1或2或3或4
{
case 1:enter(); //调用enter
break;
case 2:deleted();//调用enter
break;
case 3:search();
break;
case 4:exit(0);
}
}

int menu_select()
{
char s[80];
int c;
printf("1__Enter a name\n");
printf("2__Delete a record\n");
printf("3__Search\n");