mirror of
https://github.com/Ladebeze66/Piscine42.git
synced 2025-12-16 05:58:07 +01:00
44 lines
1.2 KiB
C
Executable File
44 lines
1.2 KiB
C
Executable File
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_rev_params.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/12/13 14:01:59 by fgras-ca #+# #+# */
|
|
/* Updated: 2022/12/13 16:48:28 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <unistd.h>
|
|
|
|
void ft_putchar(char c)
|
|
{
|
|
write(1, &c, 1);
|
|
}
|
|
|
|
void ft_putstr(char *str)
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (str[i] != '\0')
|
|
{
|
|
write(1, &str[i], 1);
|
|
i++;
|
|
}
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
int i;
|
|
|
|
i = argc -1;
|
|
while (i > 0)
|
|
{
|
|
ft_putstr(argv[i]);
|
|
ft_putchar('\n');
|
|
i--;
|
|
}
|
|
}
|