-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putchar_fd.c
37 lines (32 loc) · 1.38 KB
/
ft_putchar_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
32
33
34
35
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putchar_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edetoh <edetoh@student.42lehavre.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/19 16:34:23 by edetoh #+# #+# */
/* Updated: 2024/10/25 11:15:34 by edetoh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/* ft_putchar_fd writes character 'c' to 'fd'.
Takes 'c' (character to be written) and 'fd' (file descriptor).
Uses write() to write the character.
*/
void ft_putchar_fd(char c, int fd)
{
write(fd, &c, 1);
}
// #include <string.h>
// #include <stdio.h>
// #include <unistd.h>
// int main(int argc, char **argv)
// {
// (void)argc;
// (void)argv;
// printf("===== RESULT Putchar fd =====\n");
// ft_putchar_fd('C', 1);
// printf("=============================\n");
// return (1);
// }