Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
314 B
4
Indexable
char	*ft_strcat(char *dest, char *src)
{
	int	i;
	int	j;

	i = 0;
	j = 0;
	while (dest[i] != 0)
		i++;
	while (src[j] != 0)
	{
		dest[i] = src[j];
		i++;
		j++;
	}
	dest[i] = 0;
	return (dest);
}
#include <stdio.h>
int main()
{
	char s1[] = "Pam";
	char s2[] = "Moe";
	printf("%s",  strcat(s1, s2));
	return (0);
}