Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <memory.h>
- char* _strcat(char *a, char *b) {
- int a_length = strlen(a), b_length = strlen(b);
- char *s = (char *)malloc((a_length + b_length+ 1) * sizeof(char));
- memcpy(s, a, a_length * sizeof(char));
- memcpy(s + a_length, b, b_length * sizeof(char));
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement