ImageVerifierCode 换一换
格式:DOCX , 页数:23 ,大小:22.97KB ,
资源ID:17886363      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/17886363.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(计算机三级网络技术上机试题Word文件下载.docx)为本站会员(b****4)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

计算机三级网络技术上机试题Word文件下载.docx

1、conio.hstdio.hvoid readwriteDAT() ;int isP(int m) int i ; for(i = 2 ; i m ; i+) if(m % i = 0) return 0 ; return 1 ;main() int m, n, xx1000 ; clrscr() ; printf(nPlease enter two integers:) ; scanf(%d,%d, &m, &n ) ; num(m, n, xx) ; for(m = 0 ; m n ; m+)%d , xxm) ;n readwriteDAT() ;system(pause);void r

2、eadwriteDAT() int m, n, xx1000, i ; FILE *rf, *wf ; rf = fopen(in.dat, r wf = fopen(out.datw for(i = 0 ; 10 ; i+) fscanf(rf, %d %dn) ; m+) fprintf(wf, fprintf(wf, fclose(rf) ; fclose(wf) ;IN.DAT17 5101 7321 532 455 676 699 4781 522 666 3OUT.DAT19 23 29 31 37 103 107 109 113 127 131 137 331 337 347 3

3、49 353 37 41 43 47 59 61 67 71 73 79 79 83 89 97 101 103 101 103 107 109 787 797 809 811 821 23 29 31 37 41 43 67 71 732题目: 题目2:已知数据文件IN.DAT中存有200个四位数, 并已调用读函数readDat()把这些数存入数组a中,请考生编制一函数jsVal(),其功能是: 如果四位数各位上的数字均是0或2或4或6或8, 则统计出满足此条件的个数cnt, 并把这些四位数按从大到小的顺序存入数组b中。最后main()函数调用写函数writeDat( )把结果cnt以及数组

4、b中符合条件的四位数输出到OUT.DAT文件中。 注意: 部分源程序存在文件PROG1.C文件中。 程序中已定义数组: a200, b200, 已定义变量: cnt 请勿改动数据文件IN.DAT中的任何数据、主函数main()、读函数readDat()和写函数writeDat()的内容。-void jsVal() /*标准答案*/int bb4;int I,j,k,flag;for (I=0;200; bb0=aI/1000; bb1=aI%1000/100; bb2=aI%100/10; bb3=aI%10; for (j=0;4; if (bbj%2=0) flag=1; else fla

5、g=0;break; if (flag=1) bcnt=aI; cnt+;for(I=0;cnt-1; for(j=I+1;cnt; if (bIbj) k=bI;bI=bj;bj=k;PROG1.C#define MAX 200int aMAX, bMAX, cnt = 0;void jsVal()void readDat() FILE *fp ; fp = fopen( MAX ; i+) fscanf(fp, %dai) ; fclose(fp) ;void main() readDat() ; jsVal() ;满足条件的数=%dn, cnt) ; cnt ; i+) printf(,

6、 bi) ; writeDat() ;writeDat() FILE *fp ; int i ; fprintf(fp, %dn i+) fprintf(fp, 601250999012702580887055533476078145579528963019774770904140862679053735962087149496364052497671592546872982622764782638279382988246589298619110226969519800243953391064999467625752100110307989284529583820301094869798401

7、427831604162864664101412871273262633220761860583445809057261478523789289791946317627642855610694591378348543491624303677950255137463035354048269724389791390336504899155747452573628854211563938565455061390510747840459675375961832721041055331712825368657154408274191967894542357015007044928853027577401

8、846194922329758981699927644392729872575076736256632277901297323534805254634064824206086455886754992793310542963444100960411469234620234771492480021949937130434545477923053824064847282626724721999683398103题目: 题目3:函数READDAT()实现从文件IN.DAT中读取一篇英文文章存入到字符串数组XX中;请编制函数STROR(),其函数功能是:以行为单位把字符串中的所有小写字母O左边的字符串内

9、容移到该串的右边存放,然后并把小写字母O删除,余下的字符串内容移到已处理字符串的左边存放.最后把已处理的字符串仍按行重新存入字符串数组XX中,最后调用函数WRITEDAT()把结果XX输出到文件OUT.DAT中.例如:原文:You can create an index on any field. you have the correct record. 结果: n any field.You can create an index rd.yu have the crrect rec 原始数据文件存放的格式是:每行的宽度均小于80个字符,含标点符号和空格.-字符串(单词)的倒置和删除。答案:v

10、oid StrOR(void) /*标准答案*/int I,j,k,index,strl; char ch; for(I=0;maxline; strl=strlen(xxI); index=strl; for(j=0;strl; if(xxIj=o) for(k=j;k=index;j-)ch=xxIstrl-1; for(k=strl-1;k-)xxIk=xxIk-1;xxI0=ch;void StrOR(void) int i; char a80,*p; for(i=0;i=xxi) p1-;memcpy(t1,p1+1,p2-p1);t1p2-p1=0;strcat(t,t1);str

11、cat(t, if(p1xxi) k=0;strcpy(xxi,t);# includestdio.hstring.hconio.hchar xx5080;int maxline=0;int ReadDat(void);void WriteDat(void);void StrOR(void) clrscr();if(ReadDat()printf(Cant open the file!return;StrOR();WriteDat();int ReadDat(void)FILE *fp;int i=0;char *p;if(fp=fopen(,)=NULL) return 1;while(fg

12、ets(xxi,80,fp)!=NULL)p=strchr(xxi,nif(p) *p=0;i+;maxline=i;fclose(fp);return 0;void WriteDat(void)int i;fp=fopen(%sn,xxi);fprintf(fp,you have the correct record.You can create an index on any field, on several fields to be usedtogether, or on parts thereof, that you want to use as a key. Thekeys in

13、indexes allow you quick access to specific records and defineorders for sequential processing of a ISAM file. After you no longerneed an index, you can delete it. Addition and indexes have no effecton the data records or on other indexes.You may want a field in field in each record to uniquely ident

14、ify thatrecord from all other records in the file. For example, the EmployeeNumber field is unique if you do not assign the same number to twodifferent employees, and you never reassign these numbers to otheremployees. If you wish to find or modify the record belonging to aspecific employee, this un

15、ique field saves the thouble of determiningwhether you have the correct record.If you do not have a unique field, you must find the first recordthe matches your key and determine whether the record is the one youwant. If it is not the correct one, you must search again to find others.If you know tha

16、t you have a unique field within your records, youcan include this fact in the key description, and ISAM will allow onlyunique keys. For example, if you specify that the employee numbers areunique, ISAM only lets you add records to the file for, or changenumbers to, employee numbers that do not alre

17、adly exist int file.n any field. Yu can create an index rd. yu have the crrect rec be used Yu can create an index n any field, n several fields t use as a key. The tgether, r n parts theref, that yu want trds and define keys in indexes allw yu quick access t specific recnger rders fr sequential prce

18、ssing f a ISAM file. After yu n l effect need an index, yu can delete it. Additin and indexes have nther indexes. n the data recrds r n uniquely identify that Yu may want a field in field in each recrd tyee recrd frm all ther recrds in the file. Fr example, the Empl Number field is unique if yu d nt assign the same number t twther different emplyees, and yu never reassign these numbers t a emplyees. If yu wish t find r mdify the recrd belnging tf determining specific emplyee, this u

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1