三级数据库技术上机4-字符串专题浅析.pptVIP

  • 2
  • 0
  • 约1.43万字
  • 约 60页
  • 2017-01-15 发布于湖北
  • 举报

三级数据库技术上机4-字符串专题浅析.ppt

* tmp=(xx[i][j] 4); if ( !(tmp=32 || tmp100) ) xx[i][j]+=tmp; * #includestdio.h #includestring.h void main() { char str1[10]; strcpy(str1, china); printf(%s,str1); } * char str1[6]={Ch},str2[]={ina}; strcat(str1,str2); * //字符串的前半部分后半部分交换 char ch,str[80]; int i,j,k,len,p; for (i=0;i20;i++) { len=(int)strlen(xx[i]); p=len/2; //此时写排序的代码 //下面是交换的代码 if (len % 2) //如果字符数量是奇数 { strcpy(str,xx[i]+p+1); strncat(str,xx[i]+p,1); strncat(str,xx[i],p); } else { strcpy(str,xx[i]+p); strncat(str,xx[i],p); }//end of if //得到正确的str后,赋给xx[i] strcpy(xx[i],str); }//end of fo

文档评论(0)

1亿VIP精品文档

相关文档