-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_bzero.c
More file actions
32 lines (28 loc) · 1.1 KB
/
ft_bzero.c
File metadata and controls
32 lines (28 loc) · 1.1 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
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_bzero.c :+: :+: */
/* +:+ */
/* By: jsmidt <jsmidt@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/10/08 12:04:49 by jsmidt #+# #+# */
/* Updated: 2025/10/13 18:12:25 by jsmidt ######## odam.nl */
/* */
/* ************************************************************************** */
#include <strings.h>
#include "libft.h"
void ft_bzero(void *s, size_t n)
{
int c;
c = 0;
while (n--)
{
*(char *)s = (unsigned char)c;
s++;
}
}
// int main (void)
// {
// char s[10] = "1234567890";
// ft_bzero(s, 5);
// }