Why do we need the address of s1 in strcat(result, &s1[min]); ?
char *intertwine(char *s1, char *s2) {
retval[size_ret] = ’\0’;
return retval;
char *result = malloc(strlen(s1) + strlen(s2) + 1);
int min = strlen(s1);
if (strlen(s2) < min) {
min = strlen(s2);
}
for (int i = 0; i < min; i++) {
result[i*2] = s1[i];
result[i*2 + 1] = s2[i];
}
result[min*2] = ’\0’;
strcat(result, &s1[min]);
strcat(result, &s2[min]);
return result;
}