-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_bzero.c
More file actions
44 lines (39 loc) · 1.22 KB
/
Copy pathft_bzero.c
File metadata and controls
44 lines (39 loc) · 1.22 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
42
43
44
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: smizuoch <smizuoch@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/16 17:47:19 by smizuoch #+# #+# */
/* Updated: 2023/05/30 16:23:36 by smizuoch ### ########.fr */
/* */
/* ************************************************************************** */
#include"libft.h"
void ft_bzero(void *s, size_t n)
{
size_t c;
char *str;
c = 0;
str = (char *)s;
while (n)
{
str[c] = 0;
c ++;
n --;
}
}
/*#include<unistd.h>
#include<strings.h>
int main(void)
{
char s[7] = "123456";
int n;
n = 5;
ft_bzero(s, n);
while(n)
{
write (1, &s[n], 1);
n --;
}
}*/