Data Structures Exos

This commit is contained in:
lclerel- lclerel-
2026-03-24 18:42:13 +01:00
parent 2e708093cf
commit 7c74a633a6
26 changed files with 545 additions and 887 deletions
+43
View File
@@ -0,0 +1,43 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lclerel- <lclerel-@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/24 12:24:04 by lclerel- #+# #+# */
/* Updated: 2026/03/24 18:38:10 by lclerel- ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.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 src[] = "Salut, je suis Lumi :3";
char dst[20];
int i = 0;
ft_strcpy(dst, src);
while (dst[i])
{
write(1, &dst[i], 1);
i++;
}
write(1, "\n", 1);
return (0);
}*/