Open sq4250 opened 1 year ago
#include <stdio.h> int main() { char str1[100], str2[100]; int i = 0; scanf("%s%s", str1, str2); while (str1[i] != '\0') i++; for (int ii = 0; str2[ii] != '\0'; ii++) { str1[i + ii] = str2[ii]; } printf("%s\n", str1); return 0; }
#include <stdio.h> #include <string.h> int main() { char str1[100], str2[100]; scanf("%s%s", str1, str2); strcpy(&str1[strlen(str1)], str2); printf("%s\n", str1); return 0; }
or: