- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
二级改错题答案(Two level error correction problem answer)
二级改错题答案(Two level error correction problem answer)
First questions
The fun function given in the MODI1.C program function is: to each character in the string s, followed by repeated once, the formation of a new series on T, t according to the character sequence of characters in the original string arrangement.
For example, when the string in S is: ABAABBCCDDEE.
The string in t should be AABBCCDDEE.
Please correct the error in function fun so that it can get the correct result. Note: do not change the main function, do not increase or delete rows, nor change the structure of the program!
Modi1.c
#include
#include
#include
/************found************/
Void fun (char, s, char, t) / reference answer: void fun (char, *s, char, *t) /
{int, I, sl;
SL = strlen (s);
For (i=0; i
{t[2*i] = s[i];
T[2*i+1] = s[i];
}
/************found************/
T[2*sl] =0; / reference answer: t[2*sl] =\0; /
}
(main)
{char, s[100], t[100];
Clrscr ();
Printf (\nPlease enter string s:); scanf (%s, s);
Fun (s, t);
Printf (The, result, is:,%s\n, t);
}
Second questions
The function of the function fun in a given program MODI1.C is to repeat each character that appears in the string s, followed by a new string t, in which the characters in T are inverted in the original string.
For example, when the string in S is ABCDE,
The string in t should be EEDDCCBBAA.
Please correct the error in function fun so that it can get the correct result. Note: do not change the main function, do not increase or delete rows, nor change the structure of the program!
Modi1.c
#include
#include
#include
Void fun (char, *s, char, *t)
{int, I, sl;
SL = strlen (s);
/************found************/
For (i=1; I
{t[2*i] = s[sl-i-1];
T[2*i +1] = s[sl-i-1];
}
/************found************/
T[2*sl] =0/; / reference answer: t[2*sl] =\0; /
}
(main)
{char, s[100], t[100];
Clrscr ();
Printf (\nPlease enter string s:); scanf (%s, s);
Fun (s, t);
Printf (The, result, is:,%s\n, t);
}
Third questions
The fun function given in the MODI1
您可能关注的文档
- 一些日语口语,有时候千万别把口语说成中国式的日语,所以有兴趣的朋友来看看吧!!(Some Japanese speaking, sometimes do not speak Chinese as Chinese style of Japanese, so interested friends come to see it!!).doc
- 一些日语口语,有时候千万别把口语说成中国式的日语,所以有兴趣的朋友(Some Japanese speaking, sometimes do not speak Chinese as Chinese style of Japanese, so interested friends).doc
- 一些经典程序总结(Some classic procedures summary).doc
- 一个20岁不到小男孩21世纪的恋情(A 20 year old less than a little boy's twenty-first Century romance).doc
- 一代雄主李世民(Li Shimin).doc
- 一份公共科目全真模拟试卷(含答案)(A public subject mock papers (with answers)).doc
- 一份优秀的月度区域营企业培训销推广方案的评析(An excellent monthly training plan for regional business training).doc
- 一位武汉大学学长写给同学们的信(A letter from Wuhan University seniors to classmates).doc
- 一个简单的三维程序(A simple three-dimensional program).doc
- 一体化球形摄像机(Integrated spherical camera).doc
- 湖北省武汉市武昌区武汉市古田路中学2024年数学七上期末经典试题含解析.doc
- 2025届中国人民大学附属中学高三第一次大联考语文试题试卷含解析.doc
- 特殊疑问词用法课件.pptx
- 湖南城市学院《生物技术制药实验一》2023-2024学年第一学期期末试卷.doc
- 2025年哈尔滨市级名校初三下学期押题卷第四套(全国统一考试考前训练6月2日)物理试题含解析.doc
- 2024-2025学年山东省蒙阴县初三第六次考试数学试题含解析.doc
- 南昌工程学院《GIS软件工程》2023-2024学年第一学期期末试卷.doc
- 2024-2025学年广东省惠州一中学七年级数学第一学期期末考试模拟试题含解析.doc
- 济南市莱芜地区重点中学2024-2025学年初三下学期一诊考试语文试题含解析.doc
- 北海艺术设计学院《现代管理科学基础》2023-2024学年第二学期期末试卷.doc
原创力文档


文档评论(0)