//把str1放到str2后,即str2+str1
char str1[10]="world!";
char str2[20]="Hello ";
strcpy(str2+strlen(str2),str1);
printf("%s",str2);
//输出将是:Hello world!
//把str1放到str2后,即str2+str1
char str1[10]="world!";
char str2[20]="Hello ";
strcpy(str2+strlen(str2),str1);
printf("%s",str2);
//输出将是:Hello world!
转载于:https://www.cnblogs.com/caixu/archive/2010/12/29/1921222.html