42_C_PISCINE/C/c06v2/ex00/ft_print_program_name.c
Camille Chauvet 29ed24d567 init
2023-05-17 16:45:25 +00:00

26 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_program_name.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/20 14:55:51 by cchauvet #+# #+# */
/* Updated: 2022/07/20 14:59:25 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void print(char *str)
{
while (*str != 0)
write(1, str++, 1);
}
int main(int argc, char **argv)
{
if (argc > 0)
print(argv[0]);
}