-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_bzero.c
More file actions
34 lines (30 loc) · 1.14 KB
/
Copy pathft_bzero.c
File metadata and controls
34 lines (30 loc) · 1.14 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dramos-h <dramos-h@student.42urduli> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/29 12:23:47 by dramos-h #+# #+# */
/* Updated: 2022/11/29 12:23:49 by dramos-h ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
size_t i;
i = 0;
while (i < n)
{
((unsigned char *)s)[i] = 0;
i++;
}
}
/* int main()
{
char s[60] = "hello";
printf ("%s\n", &s[2]);
ft_bzero(s, 2);
printf ("%s\n", &s[4]);
return (0);
} */