-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_memcpy.c
30 lines (27 loc) · 1.07 KB
/
ft_memcpy.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: isalayan <isalayan@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/15 11:39:22 by isalayan #+# #+# */
/* Updated: 2024/06/15 16:05:50 by isalayan ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memcpy(void *dest, const void *src, size_t n)
{
const char *p;
char *q;
size_t i;
p = src;
q = dest;
i = 0;
while (i < n)
{
q[i] = p[i];
i++;
}
return (dest);
}