-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_bzero.c
36 lines (32 loc) · 1.17 KB
/
ft_bzero.c
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: yabenman <yabenman@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/31 06:46:01 by yabenman #+# #+# */
/* Updated: 2024/11/01 23:26:38 by yabenman ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
size_t i;
unsigned char *a;
a = s;
i = 0;
while (i < n)
{
a[i] = 0;
i++;
}
}
// int main()
// {
// int t[4] = { 5, 4, 3, 2};
// ft_bzero(NULL,6);
// int i = 0;
// while(i < 4)
// printf("%d\n",t[i++]);
// }