正在加载图片...
子 #include <iostream> using namespace std void maino char s1[20J= Hello”; char s2 20=world char s3 20 strcpy(s3, Ssl) ∥字符串拷贝 cout<<s3<<endl strcat(s3, s2 ∥字符串连接 cout<<s3<<endl例子: #include <iostream> using namespace std; void main() { char s1[20]=”Hello”; char s2[20]=”world”; char s3[20]; strcpy(s3,s1); //字符串拷贝 cout<<s3<<endl; strcat(s3,s2); //字符串连接 cout<<s3<<endl; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有