init
This commit is contained in:
30
Correction/dfdgdf/ex02/ft_strcat.c
Normal file
30
Correction/dfdgdf/ex02/ft_strcat.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strcat.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: jmendez <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/07/20 20:57:39 by jmendez #+# #+# */
|
||||
/* Updated: 2022/07/20 22:44:31 by jmendez ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user