<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/6278cb44d7996104df766e0e/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6278cb44d7996104df766e0e/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">C<span class="_ _0"> </span><span class="ff2">语言通讯录管理程序</span></div><div class="t m0 x1 h3 y3 ff2 fs0 fc0 sc0 ls0 ws0">目<span class="ff1"> </span>标:编写程序,建立一个通讯录,存放有姓名、电话号码、住址等,具备输入、查找、</div><div class="t m0 x1 h3 y4 ff2 fs0 fc0 sc0 ls0 ws0">添加、修改及删除等功能。</div><div class="t m0 x1 h3 y5 ff2 fs0 fc0 sc0 ls0 ws0">要<span class="ff1"> </span>求:具备菜单功能或详细的提示功能,至少具备数据输入、输出、查询、删除、文件</div><div class="t m0 x1 h3 y6 ff2 fs0 fc0 sc0 ls0 ws0">保存、文件读入中的两项功能。能力强的同学可以设计表格化输出。熟练掌握文件或结构</div><div class="t m0 x1 h3 y7 ff2 fs0 fc0 sc0 ls0 ws0">体的操作,程序中至少要有一个自定义结构体。总程序量不少于<span class="_ _0"> </span><span class="ff1">100<span class="_ _0"> </span></span>行,输出数据要进行</div><div class="t m0 x1 h3 y8 ff2 fs0 fc0 sc0 ls0 ws0">适当美化。程序要有详细的注释及必要的说明文档<span class="ff1"> </span></div><div class="t m0 x1 h4 y9 ff1 fs0 fc0 sc0 ls0 ws0">#include<stdio.h></div><div class="t m0 x1 h4 ya ff1 fs0 fc0 sc0 ls0 ws0">#include<stdlib.h></div><div class="t m0 x1 h4 yb ff1 fs0 fc0 sc0 ls0 ws0">#define MAX 100</div><div class="t m0 x1 h4 yc ff1 fs0 fc0 sc0 ls0 ws0">struct addr{</div><div class="t m0 x1 h4 yd ff1 fs0 fc0 sc0 ls0 ws0"> char name[30];</div><div class="t m0 x1 h4 ye ff1 fs0 fc0 sc0 ls0 ws0"> char street[40];</div><div class="t m0 x1 h4 yf ff1 fs0 fc0 sc0 ls0 ws0"> char city[20];</div><div class="t m0 x1 h4 y10 ff1 fs0 fc0 sc0 ls0 ws0"> char state[3];</div><div class="t m0 x1 h4 y11 ff1 fs0 fc0 sc0 ls0 ws0"> unsigned long int zip;</div><div class="t m0 x1 h4 y12 ff1 fs0 fc0 sc0 ls0 ws0">}add_list[MAX];</div><div class="t m0 x1 h4 y13 ff1 fs0 fc0 sc0 ls0 ws0">void init_list(void),enter(void);</div><div class="t m0 x1 h4 y14 ff1 fs0 fc0 sc0 ls0 ws0">void delete(void),list(void);</div><div class="t m0 x1 h4 y15 ff1 fs0 fc0 sc0 ls0 ws0">void load(void),save(void);</div><div class="t m0 x1 h4 y16 ff1 fs0 fc0 sc0 ls0 ws0">int menu_select(void),find_free(void);</div><div class="t m0 x1 h4 y17 ff1 fs0 fc0 sc0 ls0 ws0">int main(void)</div><div class="t m0 x1 h4 y18 ff1 fs0 fc0 sc0 ls0 ws0">{</div><div class="t m0 x1 h4 y19 ff1 fs0 fc0 sc0 ls0 ws0"> char choice;</div><div class="t m0 x1 h4 y1a ff1 fs0 fc0 sc0 ls0 ws0"> init_list();/*initialize the structure array*/ </div><div class="t m0 x1 h4 y1b ff1 fs0 fc0 sc0 ls0 ws0"> for(;;){</div><div class="t m0 x1 h4 y1c ff1 fs0 fc0 sc0 ls0 ws0"> choice=menu_select();</div><div class="t m0 x1 h4 y1d ff1 fs0 fc0 sc0 ls0 ws0"> switch(choice){</div><div class="t m0 x1 h4 y1e ff1 fs0 fc0 sc0 ls0 ws0"> case 1:enter();</div><div class="t m0 x1 h4 y1f ff1 fs0 fc0 sc0 ls0 ws0"> break;</div><div class="t m0 x1 h4 y20 ff1 fs0 fc0 sc0 ls0 ws0"> case 2:delete();</div><div class="t m0 x1 h4 y21 ff1 fs0 fc0 sc0 ls0 ws0"> break;</div><div class="t m0 x1 h4 y22 ff1 fs0 fc0 sc0 ls0 ws0"> case 3:list();</div><div class="t m0 x1 h4 y23 ff1 fs0 fc0 sc0 ls0 ws0"> break;</div><div class="t m0 x1 h4 y24 ff1 fs0 fc0 sc0 ls0 ws0"> case 4:save();</div><div class="t m0 x1 h4 y25 ff1 fs0 fc0 sc0 ls0 ws0"> break;</div><div class="t m0 x1 h4 y26 ff1 fs0 fc0 sc0 ls0 ws0"> case 5:load();</div><div class="t m0 x1 h4 y27 ff1 fs0 fc0 sc0 ls0 ws0"> break;</div><div class="t m0 x1 h4 y28 ff1 fs0 fc0 sc0 ls0 ws0"> case 6:exit(0);</div><div class="t m0 x1 h4 y29 ff1 fs0 fc0 sc0 ls0 ws0"> }</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div>
</body>
</html>