-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_bzero.c
More file actions
36 lines (31 loc) · 1.12 KB
/
ft_bzero.c
File metadata and controls
36 lines (31 loc) · 1.12 KB
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
31
32
33
34
35
36
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: marvin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/19 17:48:14 by marvin #+# #+# */
/* Updated: 2022/05/19 17:51:09 by marvin ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
size_t i;
char *ptr;
ptr = (char *)s;
i = 0;
while (i < n)
{
ptr[i] = 0;
i++;
}
}
/*int main(void)
{
char buffer[80];
ft_bzero(buffer, 20);
puts(buffer);
return 0;
}*/