Repository navigation
Expand file tree
/
Copy pathft_bzero.c
More file actions
45 lines (40 loc) · 1.35 KB
/
Copy pathft_bzero.c
File metadata and controls
45 lines (40 loc) · 1.35 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
45
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: smasatak <smasatak@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/04/25 12:15:36 by smasatak #+# #+# */
/* Updated: 2026/06/16 17:21:26 by smasatak ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
while (n--)
((unsigned char *)s)[n] = '\0';
return ;
}
// #include <stdio.h>
// int main(void)
// {
// char str[] = "Hello.";
// char str1[] = "Hello.";
// int i;
// i = 0;
// ft_bzero(str, 3);
// while (i < 7)
// {
// printf("str[%d] = %d\n", i, (int)str[i]);
// i++;
// }
// bzero(str1, 3);
// i = 0;
// while (i < 7)
// {
// printf("str[%d] = %d\n", i, (int)str[i]);
// i++;
// }
// return (0);
// }