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

BIN
Correction/titou/ex03/a.out Executable file

Binary file not shown.

View File

@ -0,0 +1,35 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strncat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/18 19:02:00 by cchauvet #+# #+# */
/* Updated: 2022/07/25 10:43:26 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
char *ft_strncat(char *dest, char *src, unsigned int nb)
{
unsigned int i;
unsigned int j;
i = 0;
while (dest[i] != 0)
i++;
j = 0;
while (src[j] != 0 && j < nb)
{
dest[i + j] = src[j];
j++;
}
dest[i + j] = 0;
return (dest);
}
#include <stdio.h>
int main(){
char tab[] = "camille est beau";
char tab2[] = "Camille est beau";
printf("%s", ft_strncat(tab, tab2, 10));
}