三级网络100题分类版.docVIP

  • 2
  • 0
  • 约4.45千字
  • 约 7页
  • 2017-08-05 发布于河南
  • 举报
四、字符串位置倒置: 3 :原文:You can create an index on any field. you have the correct record. 结果: n any field.Yu can create an index rd.yu have the crrect rec 原始数据文件存放的格式是:每行的宽度均小于80个字符,含标点符号和空格. --------------类型:字符串(单词)的倒置和删除。 void StrOR(void) /*标准答案*/ {int I,j,k,index,strl; char ch; for(I=0;Imaxline;I++) {strl=strlen(xx[I]); index=strl; for(j=0;jstrl;j++) if(xx[I][j]==o) {for(k=j;kstrl-1;k++) xx[I][k]=xx[I][k+1]; xx[I][strl-1]= ; index=j;} for(j=strl-1;j=index;j--) {ch=xx[I][strl-1]; for(k=strl-1;k0;k--) xx[I][k]=xx[I][k-1]; xx[I][0]=ch;} } } 或者: void StrOR(void) { int i; char a[80],*p; for(i=0;ima

文档评论(0)

1亿VIP精品文档

相关文档