SHOW:
|
|
- or go back to the newest paste.
1 | - | void my_strcat(char *s1, char *s2) { char *s = malloc(strlen(s1) + strlen(s2) + sizeof("hello")); if(s == NULL) exit(EXIT_FAILURE); s[0] = '\0'; strcat(s, s1); strcat(s, s2); strcat(s, "hello"); } |
1 | + | char*msc(char*a,char*b){char*s=malloc(strlen(a)+strlen(b)+sizeof("hello"));if(!s)exit(-1);*s=0;strcat(s,a);strcat(s,b);strcat(s,"hello");return s;} |