-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_bzero.c
More file actions
41 lines (37 loc) · 1.19 KB
/
Copy pathft_bzero.c
File metadata and controls
41 lines (37 loc) · 1.19 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
37
38
39
40
41
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: csekakul <csekakul@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/01/13 12:20:59 by csekakul #+# #+# */
/* Updated: 2026/01/16 15:44:42 by csekakul ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
size_t i;
unsigned char *p;
p = (unsigned char *)s;
i = 0;
while (i < n)
{
p[i] = 0;
i++;
}
}
/*int main(void)
{
int i = 0;
char buffer[20];
ft_bzero(buffer, 20);
while (i < 20)
{
printf("%d ", buffer[i]);
i++;
}
printf("\n");
return (0);
}*/