皮皮学,免费搜题
登录
搜题
【简答题】
函数ReadDat()的功能是实现从文件IN73.DAT中读取一篇英文文章存入到字符串数组xx中。请编制函数CovertCharD(),该函数的功能是:以行为单位把字符串中的所有小写字母改成该字母的上一个字母,如果是字母a,则改成字母z。大写字母仍为大写字母,小写字母仍为小写字母,其他字符不变。把已处理的字符串仍按行重新存入字符串数组xx中,最后调用函数 WriteDat()把结果xx输出到文件OUT73.DAT中。 例如:原文Adb Bcdza abck LLhj 结果Aca Bbcyz, zabj LLgi 原始数据文件存放的格式是:每行的宽度均小于80个字符,含标点符号和空格。 注意:部分源程序已给出。 请勿改动主函数main()、读函数ReadDat()和写函数Wiltedat()的内容。 试题程序: include<stdio. h> include<string. h> include<conio. h> char xx[50] [80]; int maxline=0; int ReadDat (void); void WriteDat (void); void CovertCharD ( ) { } void main ( ) { clrscr ( ); if (ReadDat ( ) ) { printf ( '数据文件IN73 .DAT 不能打开/n/007'); return; } CovertCharD ( ); WriteDat (); } int ReadDat () { FILE *fp; int i=0; char *p; if ( ( fp= fopen ( 'IN73. DAT', 'r' ) ) = =NULL) return while (fgets (xx [i], 80, fp) !=NULL) { p=strchr (xx [i] , '/n' ); if(p) *p=0; i++; } maxline=i; fclose (fp); return 0; } void WriteDat (void) { FILE *fp; int i; clrscr ( ); fp=fopen('OUT73 .DAT', 'w'); for (i=0; i<maxline; i++) { printf ( '%s/n' ,xx [i] ); fprintf (fp, '%s/n' ,xx[i] ); } fclose (fp); }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【简答题】第二次全国对口支援工作会议2011年5月27日至29日在北京召开。读地图和坎儿井示意图,回答下列问题。(13分) (1)是一个以____________族(少数民族)、汉族为主体的多民族聚居区。 (2)支援的物资,利用铁路运输,经 (铁路干线)线进入,沿线可能看到的风光是_________。 A.大漠孤烟 B.稻花飘香 C.热带丛林 D.傣家竹楼 (3)读图可知,从的山脉和...
【单选题】Why can't everyone make token money?
A.
Because it is too expensive to manufacture
B.
Because the material to make token money is hard to find
C.
Because it is difficult for an individual to get the license for manufacture from the government.
D.
Because the government prohibits private manufacture
【简答题】A.Ethernet B.Token Bus C.Token Ring D.DQDB
【单选题】下面哪一项是创新的理性思维方式在科学技术上的表现?()
A.
批判理性的运用
B.
制定规则的能力创立
C.
更新组织、制度的能力
D.
形而上的思考
【单选题】以下哪是决定生产可能性曲线凹向原点的原因
A.
边际效用递减
B.
边际收益递减
C.
规模报酬递增
D.
规模经济
【单选题】Lecture D Monsoons What does "by the same token"
A.
at the same price
B.
in the same way, for the same reason
C.
made from the same thing
D.
at the same time
【单选题】Why can't everyone make token money?
A.
because it is too expensive to manufacture.
B.
because the material to make token money is hard to find.
C.
because it is difficult for an individual to get the license for manufacture from the government.
D.
because the government prohibits private manufacture.
【单选题】西方人的创新的理性思维方式表现在哪些方面?()
A.
哲学上:形而上的思考
B.
科学、技术上:批判理性的运用
C.
社会领域:制定规则的能力;创立和更新组织、制度的能力
D.
以上都是正确的
【简答题】胚胎移植时,接受胚胎的个体称 。
【单选题】My book is different from yours.
A.
is the same as
B.
isn’t the same as
C.
is the same like
D.
isn’t the same like
相关题目: