#include #include char* concat(const char *s1, const char *s2) { char *result = malloc(strlen(s1)+strlen(s2)+1);//+1 for the zero-terminator strcpy(result, s1); strcat(result, s2); return result; }