标签:编程 void end cat containe pause 字符串 code main
void strcat(char s[], char ct[]) {
int i=0, j=0;
while (s[i] != ‘\0‘) i++;
while (ct[j] != ‘\0‘) s[i++] = ct[j++];
s[i] = ‘\0‘;
}
int main(void) {
char a[40] = "wt ";
char b[20] = "is a postgraduate";
strcat(a, b);
cout << "连接后的字符串为:" << endl;
cout << a<<endl;
system("pause");
return 0;
标签:编程 void end cat containe pause 字符串 code main
原文地址:https://www.cnblogs.com/wt-seu/p/13039566.html