#include <stdio.h>
int ft_strlen(char *str)
{
unsigned int i;
i = 0;
while (str[i] != '\0')
{
i++;
}
return (i);
}
char *ft_strcat( char *dest, char *src)
{
unsigned int c;
unsigned int i;
i = 0;
c = ft_strlen(src);
while (src[i] != '\0')
{
dest[i + c] = src[i];
i++;
}
dest[i + c] = '\0';
return(dest);
}
int main(void)
{
char str1[] = "ABC";
char str2[] = " jABJ";
char str3[] = "AB gr";
char str4[] = "ABZffwwefthwf";
char str5[] = "ABA";
printf("%d", ft_strcat(str1, str3));
return (0);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: