#include <stdio.h>
char *ft_strcpy(char *dest, char *src)
{
int i;
i = 0;
while (src[i] != '\0')
{
dest[i] = src[i];
i++;
}
dest[i] = '\0';
return (dest);
}
int main(void)
{
char dest[15];
char src[] = "Hello";
printf("Avant : %s \n", dest);
ft_strcpy(dest, src);
printf("Apres : %s \n", dest);
return (0);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: