两个字符串连接程序
代码:
int main(void) {
char s1[14] = "cmy", s2[10] = "123";
int i = 0, j = 0;
while (s1[i]) {
i++;
}
while (s2[j]) {
s1[i++] = s2[j++];
}
puts(s1);
return 0;
}
两个字符串连接程序
代码:
int main(void) {
char s1[14] = "cmy", s2[10] = "123";
int i = 0, j = 0;
while (s1[i]) {
i++;
}
while (s2[j]) {
s1[i++] = s2[j++];
}
puts(s1);
return 0;
}