-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr_fd.c
31 lines (29 loc) · 1.11 KB
/
ft_putstr_fd.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rhiguita <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/05 19:01:00 by rhiguita #+# #+# */
/* Updated: 2024/05/06 22:20:04 by rhiguita ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putstr_fd(char *s, int fd)
{
while (*s)
{
write(fd, s, 1);
s++;
}
}
/*
int main()
{
int fd = open ("file.txt", O_RDWR | O_CREAT);
char s[25] = "Welcome";
ft_putstr_fd(s, fd);
close(fd);
return (0);
}*/