42_C_PISCINE/C/c06v2/ex02/ft_rev_params.c

33 lines
1.1 KiB
C
Raw Normal View History

2023-05-17 12:45:25 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_rev_params.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/20 14:55:51 by cchauvet #+# #+# */
/* Updated: 2022/07/20 15:06:49 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void print(char *str)
{
while (*str != 0)
write(1, str++, 1);
}
int main(int argc, char **argv)
{
int i;
i = argc - 1;
while (i > 0)
{
print(argv[i]);
print("\n");
i--;
}
}