ft_putnbr_fd
Subject
FT_PUTNBR_FD (simplified)
NAME
ft_putnbr_fd -- write an int on a specified file descriptor
SYNOPSIS
void ft_putnbr_fd(int n, int fd);
DESCRIPTION
ft_putnbr_fd() writes the int n on the file descriptor fd
PARAMETERS
n: int to write
fd: file descriptor on which to write
RETURN VALUES
ft_putnbr_fd() does not return anything
AUTHORIZED EXTERNAL FUNCTIONS
write(2)
Understandable explanation
This function works the same way as the ft_putnbr()
function you had to do during the Piscine, it also takes the fd
parameter, like ft_putchar_fd()
, ft_putstr_fd()
, ft_putendl_fd()
.
I think that going from here you should be able to build it.
Hints
Don't forget that the character 0
is not code 0
in the ASCII
table, I think you can take a look at your Piscine code (C05 - Ex04
), it works the same.
Commented solution
Last updated
Was this helpful?