-
Notifications
You must be signed in to change notification settings - Fork 2
/
ft_bzero.c
35 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: marsoare <marsoare@student.42porto.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/18 10:50:30 by marsoare #+# #+# */
/* Updated: 2024/02/21 13:24:28 by marsoare ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
ft_memset(s, 0, n);
}
/*
#include <stdio.h>
int main(void)
{
char str[7] = "Markos";
ft_bzero(str+1, 3*sizeof(char));
printf("string after ft_bzero(): %s\n", str);
int i = 0;
while (i < 6)
{
write(1, &str[i], 1);
i++;
}
return (0);
}
*/