-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_bzero.c
More file actions
37 lines (32 loc) · 1.18 KB
/
ft_bzero.c
File metadata and controls
37 lines (32 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sparth <sparth@student.42heilbronn.de> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/06 17:59:14 by sparth #+# #+# */
/* Updated: 2023/10/11 10:42:06 by sparth ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
char *string;
size_t i;
string = (char *) s;
i = 0;
while (i < n)
{
string[i] = '\0';
i++;
}
}
// #include <stdio.h>
// int main()
// {
// char string [] = "hello guys";
// ft_bzero(string + 5, 6);
// printf("%s\n", string);
// return (0);
// }