当前位置:编程学习 > C#/ASP.NET >>

自动考试系统


#include"stdio.h" #include"stdlib.h" #include"string.h" struct problem { int id; char *pro,*opA,*opB,*opC,*opD; char answer; struct problem *link; }; typedef struct problem PRM; void list(PRM *head) { PRM *p; p=head->link; if(p==NULL)printf("nLink talbe is empty!!"); else while(p!=NULL) { printf("nid=%d Question:%sn A.%sn B.%sn C.%sn D.%sn",p->id,p->pro,p->opA,p->opB,p->opC,p->opD); p=p->link; } } void freelist(PRM *head) { PRM *p; p=head->link; while(p!=NULL) { free(head); head=p; p=p->link; } } PRM*findproblem(PRM *head,int id) { PRM*p; PRM*pleft; p=head->link; pleft=head; while(p!=NULL&&p->id!=id){pleft=p;p=p->link;} return pleft; } void add(PRM *head,int id,char *pro,char *opA,char *opB,char *opC,char *opD,int answer) { int len; PRM *p=head; PRM *tp; int i=0; len=head->id; tp=(PRM *)malloc(sizeof(PRM)); tp->id=id; tp->answer=answer; tp->pro="liujun"; tp->opA="p"; tp->opB="p"; tp->opC="p"; tp->opD="p"; strcpy(tp->pro,pro); strcpy(tp->opA,opA); strcpy(tp->opB,opB); strcpy(tp->opC,opC); strcpy(tp->opD,opD); tp->link=NULL; if(len==0){p->link=tp;head->id++;} else {p=findproblem(head,id); tp->link=p->link; p->link=tp; head->id++; } p=head; while(p!=NULL) { p->id=i++; p=p->link;} head->id=i-1; } void del(PRM * head,int id) {PRM *p,*tp; int i=0; p=findproblem(head,id); tp=p->link; p->link=tp->link; free(tp); p=head; while(p!=NULL) { p->id=i++; p=p->link;} head->id=i-1; } void modify() { } void savetofile(PRM*head) { PRM*p=head->link; FILE*fp; fp=fopen("data,txt","a"); while(p!=NULL) { fprintf(fp,"n%d%20s%d",p->id,p->answer); p=p->link; } fclose(fp); } void loadfromfile(PRM *head) { PRM *op,*tp; FILE *fop; int i=0; tp=head; printf("n"); while(tp->link!=NULL)tp=tp->link; if((fop=fopen("data,txt",<div class='kjy'><<pre><span>补充:</span>asp.net教程,C语言</pre></div><div class="zykmore"><script type="text/javascript" src="/js/s3.js"></script></div><div class="content"><p>上一个:<a href="/show/a1dd72c075adeac0.htm">我一学期的上机实验</a><br/>下一个:<a href="/show/3b9370efb5dd4097.htm">最小耗费生成树</a></p><div class="piclist">更多图片编程知识:<ul><li><a href="/show/b6c234d058d51f59.htm"><img src='/upload/20131226/1256107_13119249048e3K.jpg' width=105 height=105><br/>statusToolStripStatusLabel 位置问题</a></li><li><a href="/show/861c713816a2290e.htm"><img src='/upload/20131226/3.gif' width=105 height=105><br/>c#数组问题请教</a></li><li><a href="/show/d51f0cbf5ae6fdca.htm"><img src='/upload/20131226/14.gif' width=105 height=105><br/>ToString()后为何将Double类型的值四舍五入了?</a></li><li><a href="/show/b52283a3eae60e53.htm"><img src='/upload/20131227/6.gif' width=105 height=105><br/>Cookie 删除不了啊,Help?</a></li><li><a href="/show/c71988a6a768881b.htm"><img src='/upload/20131227/2.gif' width=105 height=105><br/>Share</a></li><li><a href="/show/fce84978b3ba66d5.htm"><img src='/upload/20131226/19.gif' width=105 height=105><br/>第一次用MVC3做的网站,用起来果然不一样</a></li></ul></div></div> <div class="zykmore"><script type="text/javascript" src="/js/s4.js"></script></div><div class="more"><dl><dt>更多<a href="/list/9_1.htm">C#/ASP.NET</a>疑问解答:</dt><dd><a target="_blank" href="/show/658b6097e8703c15.htm">C# 数据采集</a></dd><dd><a target="_blank" href="/show/c55e849abbf64c22.htm">jqGrid</a></dd><dd><a target="_blank" href="/show/a0fa803ad138ffaf.htm">学C#编程一定要学编译原理吗?(新手提问)</a></dd><dd><a target="_blank" href="/show/1765ce6d53f3f3ad.htm">VC2010 Unicode字符集下通过ReadProcessMemory跨进程读取SysListView32控件总是乱码</a></dd><dd><a target="_blank" href="/show/c947d456eccf33a5.htm">C#源文件恢复。电脑死机了</a></dd><dd><a target="_blank" href="/show/1053f7b8c674fa24.htm">asp生成动画,求各位给个技术建议,或者大致方法。。。。</a></dd><dd><a target="_blank" href="/show/811c83512f5c95b8.htm">C#中 如何把excel的数据每一一列的值,赋值给一个一位数组呢</a></dd><dd><a target="_blank" href="/show/6a8f5ee7f71d389d.htm">关于多线程同步问题.</a></dd><dd><a target="_blank" href="/show/2a399a8a73ef8cb2.htm">怎么自动登录网站并填值返回。</a></dd><dd><a target="_blank" href="/show/89dd22b3512e2368.htm">怎么做程序小游戏</a></dd><dd><a target="_blank" href="/show/de7dc59fc1f3e366.htm">C#调用C++dll函数出现“尝试读取或写入受保护的内存”</a></dd><dd><a target="_blank" href="/show/7b71fba43dea69e3.htm">wcf服务更新某业务逻辑需要关闭整个wcf服务吗</a></dd><dd><a target="_blank" href="/show/d709df83472d01e9.htm">数据同步</a></dd><dd><a target="_blank" href="/show/39d80b16ed5689b5.htm">课程继承要怎么讲</a></dd><dd><a target="_blank" href="/show/d4ea101fe11dc917.htm">sql 语句合并的问题</a></dd></dl></div> </div> <div id="zykleft"> <div class="leftm"> <div id="logo"><a href="http://www.zzzyk.com/">站长资源库</a> <div class="clear"></div><script type="text/javascript" src="/js/i7f.js"></script></div> <script type="text/javascript" src="/js/sharen.js"></script><div class="clear"></div> <dl class="list"><dd><a href="/list/1_1.htm">asp</a></dd><dd><a href="/list/2_1.htm">php</a></dd><dd><a href="/list/3_1.htm">Delphi</a></dd><dd><a href="/list/4_1.htm">Matlab</a></dd><dd><a href="/list/5_1.htm">JSP</a></dd><dd><a href="/list/6_1.htm">Foxpro</a></dd><dd><a href="/list/7_1.htm">JS</a></dd><dd><a href="/list/8_1.htm">C/C++</a></dd><dd><a href="/list/9_1.htm">C#/ASP.NET</a></dd><dd><a href="/list/10_1.htm">VC++</a></dd><dd><a href="/list/11_1.htm">JAVA</a></dd><dd><a href="/list/12_1.htm">VB</a></dd><dd><a href="/list/13_1.htm">汇编语言</a></dd><dd><a href="/list/20_1.htm">html/css</a></dd><dd><a href="/list/21_1.htm">CGI</a></dd><dd><a href="/list/23_1.htm">XML/UML</a></dd><dd><a href="/list/24_1.htm">wap</a></dd><dd><a href="/list/27_1.htm">网站相关</a></dd><dd><a href="/list/60_1.htm">网页素材</a></dd><dd><a href="/list/70_1.htm">python</a></dd><dd><a href="/list/71_1.htm">微信小程序</a></dd><dd><a href="/list/72_1.htm">thinkphp</a></dd></dl><dl class="notice">如果你遇到<a href="/default.htm">编程学习</a>难题:<br/>访问www.zzzyk.com 试试</dl> </div> <div class="leftm"><dl><dt><script type="text/javascript" src="/js/s5.js"></script></dt></dl></div> <div class="leftm"><dl><dt><script type="text/javascript" src="/js/s6.js"></script></dt></dl></div> </div></div> <div class="clear"></div> <div class="bdshare"> <script type="text/javascript" src="/js/share.js"></script> </div> <div class="clear"></div> <div class="foot">CopyRight &copy; 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved<br/>部分文章来自网络,<script type="text/javascript" src="/images/my.js"></script> </div> </body> </html>