题解 | #字符串连接#
字符串连接
https://www.nowcoder.com/practice/40d83e5509b04d20825ae68fe35e9ca8
#include <stdio.h> int main() { char s1[100], s2[100], res[200]; while (scanf("%s %s", s1, s2) != EOF) { int i = 0, top = 0; while (s1[i] != '\0') res[top++] = s1[i++]; i = 0; while (s2[i] != '\0') res[top++] = s2[i++]; res[top] = '\0'; printf("%s", res); } return 0; }