- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
15.字符串排序(15. string sorting)
15.字符串排序(15. string sorting) 79. (ReadDat) function to achieve read a English from the IN.DAT file into an array of strings in XX, please prepare the function SortCharD (), its function is: per character of the sequence of sorting, sorting the results according to the bank to re deposit the string array XX. The last call to writeDat (XX) the results output to a file in OUT2.DAT. Example: Original: dAe, BfC. CCbbAA Results: fedCBA. BbCCAA / * solution: Void sortchard (void) {int I, J, K; int str; Char temp; For (i=0; imaxline; i++) {str=strlen (xx[i]); For (j=0; jstr-1; j++) For (k=j+1; kstr; k++) If (xx[i][j]xx[i][k]) {temp=xx[i][j]; Xx[i][j]=xx[i][k]; Xx[i][k]=temp;}}} 80. (READDAT) function can read a English article from the file IN.DAT into the string array XX; (SORTCHARA), please prepare the function the function is: in units of characters according to the order from small to large, the results sorted according to the re stored in the string array XX, the last call (WRITEDAT) the results output to the XX OUT.DATK. Example: Original: dAe, BfC. CCbbAA Results:.ABCdef. AACCbb / * solution: Void sortcharA (void) {int I, J, K; int strl; Char temp; For (i=0; imaxline; i++) {str=strlen (xx[i]); For (j=0; jstr-1; j++) For (k=j+1; kstr; k++) If (xx[i][j]xx[i][k]) {temp=xx[i][j]; Xx[i][j]=xx[i][k]; Xx[i][k]=temp;}}} 81. function ReadDat () read 20 lines of data from in.dat file stored in the string array in XX (the string length is less than 80). Please prepare the function jsSort (), its function is: per string according to the given conditions of the sort, sort the results according to the bank to re deposit the string array XX, the last call to WriteDat (XX) the results output to a file in out.dat. Condition: from the middle part of the left One divides into two. string, according to the character of the ASCII value in descending order, the left part and the right part of the sorted exchange. If the original string length is odd, then the central character is not in c
您可能关注的文档
- 03-3-1回归企业本质(03-3-1 regression, enterprise, essence).doc
- 03g101-1勘误、调整、增补(03g101-1 Corrigendum, adjustment, additions).doc
- 03栈的基本操作之括号匹配,进制转换(03, the basic operation of the stack bracket matching, hexadecimal conversion).doc
- 0321中国文化概论-08年1月自考试题整合答案(0321 introduction to Chinese culture, -08 January self test questions integrated answer).doc
- 00部分常用卫星天线接收器密码(出厂初始密码)(The 00 part is the password of common satellite antenna receiver (initial password)).doc
- 03级给水排水(03 stage water supply and drainage).doc
- 013 i++和++i的效率差别(013 efficiency difference between i++ and ++i).doc
- 04-05年下学期七年级单元同步测试地理巴西a卷(附答案)(04-05 next semester, unit seven, simultaneous testing, geography Brazil a (with answers)).doc
- 04养生论(04 health preserving theory).doc
- 04技术分析精要(Analysis of 04 key technology).doc
- 14秋《英汉-汉英翻译》作业4(14 autumn Chinese English Chinese translation work 4).doc
- 150部必看的电影,小资文艺必看(150 must see movies, petty bourgeois literature must see).doc
- 15个收藏多年的笑话(15 collections of jokes for years).doc
- 15分钟规定时间内完胜英语四六级快速阅读(15 minutes, within the specified time to win the English 46 speed reading).doc
- 16中层管理高级研修班(16 intermediate management senior seminar).doc
- 162.流的读写(Read and write in 162. streams).doc
- 16位二进制转换为bcd码的c51汇编程序(16 bit binary converted to BCD code C51 assembler).doc
- 16mn钢板焊接(16Mn steel plate welding).doc
- 16各类民用建筑设计规范(16 specifications for the design of civil buildings).doc
- 16姥姥的剪纸导学案(16, grandma's paper cutting guidance case).doc
最近下载
- 咽喉用药市场白皮书.pdf VIP
- 临时用电施工方案.doc VIP
- 民族区域自治制度优秀教学课件.pptx VIP
- 人民大2024《人工智能与Python程序设计》课件(教材配套版)第10章-使用 Python 语言实现机器学习模型-回归分析.pdf VIP
- Lesson 3 at the seaside(课件)典范英语三年级上册.pptx VIP
- 人民大2024《人工智能与Python程序设计》课件(教材配套版)第9章-机器学习概述.pdf VIP
- 主体性概念的历史演变与理论探讨.docx VIP
- 普外科质量与安全管理小组活动记录.docx VIP
- 医院急性创伤患者救治流程.pdf VIP
- 讲义 16 分式讲 16 分式.doc VIP
文档评论(0)