-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathft_bzero.c
More file actions
39 lines (33 loc) · 1.18 KB
/
ft_bzero.c
File metadata and controls
39 lines (33 loc) · 1.18 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jperpect <jperpect@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/10 16:51:56 by jperpect #+# #+# */
/* Updated: 2024/04/30 12:41:35 by jperpect ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
size_t cont;
char *str;
cont = 0;
str = (char *)s;
while (cont < n)
{
str[cont] = '\0';
cont++;
}
}
/*
int main (void)
{
char ok[1000] = "vai a merdasdajflkjdl;skfjskladj";
int com = 154656465;
char *o;
ft_bzero(ok, 5);
write(1,&ok[5],1);
}*/