- 1、本文档共23页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
数字或字符移位后的计算(Numeric or character shift calculation)
数字或字符移位后的计算(Numeric or character shift calculation)
21 questions
The function ReadDat () to read a English article from the IN.DAT file into an array of strings in XX, please prepare the function CharConvA (), its function is: in units of the last character in the string and the ASCII value of the right 4 after the last second characters of ASCII, the last a new character, the last second characters of the ASCII value of right 4 after the last third characters of ASCII value, finally get second new characters, and so on have been treated to second characters, the first character of the ASCII value and the original last character of ASCII, was the first of a new character the new character, the original string are stored in the corresponding position. Finally, the string that has been processed is re stored in the string array XX by line, and finally the function writeDat () is called to output the result XX to the file OUT10.DAT.
The format of the original data file is: the width of each row is less than 80 characters, including punctuation and spaces.
Some source programs have been given.
Do not change the contents of the main function main () and the write function writeDat ().
#includestdio.h
#includestring.h
#includeconio.h
Char xx[50][80];
Int maxline=0; the total number of articles / *
Int ReadDat (void)
Void WriteDat (void)
Void, CharConvA ()
{
}
Void, main ()
{
Clrscr ();
If (ReadDat ()) {
Printf (data file ENG.IN cannot be opened! \n\007 ;
Return;
}
CharConvA ();
WriteDat ();
}
Int ReadDat (void)
{
FILE *fp;
Int i=0;
Char *p;
If ((fp=fopen (IN.DAT, R)) ==NULL) return 1;
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;
Fp=fopen (OUT10.DAT, W);
For (i=0; imaxline; i++) {
Printf (%s\n, xx[i]);
Fprintf (FP,%s\n, xx[i]);
}
Fclose (FP);
}
--------------------------------------------------------------------------------
Note: in this question, the main thing i
您可能关注的文档
- 抱拳礼2(Boxing ceremony 2).doc
- 拇指肌腱断了(The tendon of the thumb is broken).doc
- 报孙会宗书(Sun Hui Zong Shu Shu).doc
- 抹茶和绿茶的区别(The difference between green tea and Green Tea.).doc
- 拉丁舞技巧(Latin dance techniques).doc
- 报考呈现六点变化,考情继续高位盘整(Enter oneself for an examination presents six changes, test situation continues to high consolidation).doc
- 拉伸增高法(Stretch increasing method).doc
- 护理综合复习大纲(Comprehensive nursing review program).doc
- 拉布拉多幼年期的训练方法.doc
- 拉延模设计(Drawing die design).doc
- 数字电影(Digital movie).doc
- 数字电视100问(Digital TV 100 questions).doc
- 数字的代表(Digital representation).doc
- 数字记忆(Digital memory).doc
- 数字运算(Digital operation).doc
- 数字通信中几种调制方式的星座图(Constellation of several modulation modes in digital communications).doc
- 数学“课堂教学创新实践与研究”课题学期总结.doc
- 数学专业参考书推荐(Reference books for Mathematics).doc
- 数学二考研大纲(Mathematics two postgraduate entrance examination program).doc
- 数学全能公式(Mathematical omnipotence formula).doc
最近下载
- 连续性肾脏替代治疗院感防控(专家共识).pptx VIP
- 《党政机关厉行节约反对浪费条例》详细内容学习(PPT+文稿).pptx VIP
- 2024年新人教版化学九年级上册全册教学课件(新教材).pptx
- 涉密工程必威体育官网网址管理方案(3篇).docx VIP
- 19CJ20、19CG12 钢骨架轻型板 参考图集.docx VIP
- 2025年某工程造价咨询三级复核制度及执业质量保证制度.pdf VIP
- 工程造价咨询报告三级复核制度.docx VIP
- T BAHIM 001—2025 重症医学科一体化管理规范.pdf VIP
- “四议两公开”会议记录模板.docx VIP
- 工程施工临时用工合同6篇.docx VIP
文档评论(0)