-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memset.c
More file actions
23 lines (20 loc) · 1.01 KB
/
ft_memset.c
File metadata and controls
23 lines (20 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memset.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ebarbash <ebarbash@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/16 21:51:06 by ebarbash #+# #+# */
/* Updated: 2024/10/26 12:41:26 by ebarbash ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
void *ft_memset(void *s, int c, size_t n)
{
char *temp;
temp = (char *)s;
while (n--)
*temp++ = (char)c;
return (s);
}