This commit is contained in:
Camille Chauvet
2023-05-17 16:45:25 +00:00
commit 29ed24d567
619 changed files with 16119 additions and 0 deletions

View File

@ -0,0 +1,39 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: thellego <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/16 13:44:49 by thellego #+# #+# */
/* Updated: 2022/07/20 10:51:58 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
char *ft_strcpy(char *dest, char *src)
{
int counter;
counter = 0;
while (*src != '\0')
{
dest[counter] = src[counter];
counter++;
}
dest[counter] = '\0';
return (dest);
}
int main()
{
char tab1[120] = "Hello world jjhaflhsuid ai;eiwjejvhds jdg";
char tab[120] = "";
tab1[0] = 8;
ft_strcpy(tab, tab1);
printf("%s\n", tab1);
printf("%s\n", tab);
}