- 1、本文档共19页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
二级C上机编程答案※※A※B……题型
二级C上机编程答案※※A※B……题型
4. The specified input string contains only letters and * Numbers. Write function fun with the function of deleting all the * Numbers in the string. When you write a function, you must not use the string function provided by C.
For example, the content in A string is: * * * * A * * * * * * * * * * * * *, and the contents of the deleted strings should be: ABCDEFG.
Note: part of the source program is in the file prog1.c.
Please do not change any content in main function main and any other functions, just fill in the number of statements you wrote in the curly brackets of function fun.
【 reference 】
Void fun (char * a)
{
Int I, j = 0;
For (I = 0; a [I]! = \ 0; I + +)
If (a [I]! = *)
A [j +] = a [I]; / * if the character is not deleted, then * /
A [j] = \ 0; / * end with the string terminator, \ 0 * /
}
12. The specified input string contains only letters and * Numbers. Please write function fun. The function is to delete all the other * Numbers in the string except the * number of the string leading. When you write a function, you must not use the string function provided by C language.
For example, the content in the string is: * * * * * * * * * * * * * * * * * * * *, and the contents of the string should be: * * * * * ABCDEFG.
Note: part of the source program is in the file prog1.c.
Please do not change any content in main function main and any other functions, just fill in the number of statements you prepared in the curly brackets of function fun.
【 reference 】
Void fun (char * a)
{
Int I = 0;
Char * p = a;
While (* p * p = = *)
{
A [I] = * p; I++; P++;
}
While (* p)
{
If (* p! = *)
{
A [I] = * p; I++;
}
P++;
}
A [I] = \ 0;
}
14. The input string contains only letters and * Numbers. Please write function fun, and its function is: delete the * number of the tail of the string, and the * number in the front and middle is not moved.
For example, the contents of the string is: * * * * A * BC * DEF * G * * * * * * *, after deletion, the contents of t
您可能关注的文档
- (nikkie)的减肥秘籍((nikkie) the secret of losing weight).doc
- 东京语文学院日本语センター入 学 愿 书(东京文学院日语入门).doc
- (口袋妖怪)火红叶绿金手指((pokemon) flame-red green gold finger).doc
- (骨病)试题((bone disease)).doc
- 东北农业大学 蓄产品加工 乳笔记(Dairy products processing and milk notes of northeast agricultural university).doc
- 东北三宝(The northeast sambo).doc
- 东北大学健康教育机考题(Northeast university health education machine test).doc
- 东北特产(The northeast specialty).doc
- 东师《英汉翻译》2013春第二次在线作业(随机)(Second online assignment (random) in spring 2013).doc
- 东师《刑事诉讼法学(高起专)2013春第二次在线作业(The east division, criminal procedure law (high technical secondary), the second online operation in spring 2013).doc
- 从泰坦尼克号的沉没到世贸大楼的倒塌(From the sinking of the Titanic to the collapse of the world trade center).doc
- 从熊身体取胆汁请看人类的残忍(Take the bile from the bear to see the human cruelty).doc
- 从秀域的成长看企业如何发育平台型战略(How to develop a platform strategy from the growth of xiu).doc
- 从卫生经济学看中医代表未来医学发展方向(From the view of health economics, TCM represents the future development direction of medicine).doc
- 从美容学观点看蜂产品美容作用及蜂源美容品的开发(From the view of cosmetology, the development of the beauty of bee products and the beauty of bee).doc
- 从芯片上看内存大小(Memory size on a chip).doc
- 从菜鸟到高手第一辑 综述.doc
- 从金融IT公司工作十年后转到银行工作一年内的体会(I have been working in a bank for a year after ten years of working in a financial IT company).doc
- 从霍震寰接班霍英东看企业文化的传承性(Look from the illness Ian fok ying tung the inheritance of culture).doc
- 低年资的医生同志自我保护必读(A low-paid doctor is required to self-protect).doc
文档评论(0)