正在加载图片...
字符串处理(面向过程) int maino char s1[20]=hello" s2[]="world"i cout<< strlen(s1)<<end//字符串长度 if( strcmp(s1,s2)>0)//字符串比较 strcat(s1,s2)P/字符串相加 cout≤≤s1<≤endI return o2 字符串处理(面向过程) int main() { char s1[20]="hello", s2[]="world"; cout<<strlen(s1)<<endl; //字符串长度 if(strcmp(s1, s2)>0) //字符串比较 ... strcat(s1, s2); //字符串相加 cout<<s1<<endl; return 0; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有