-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_print_params.c
44 lines (39 loc) · 1.2 KB
/
ft_print_params.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
38
39
40
41
42
43
44
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_params.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: davgalle <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/07/24 09:46:23 by davgalle #+# #+# */
/* Updated: 2023/07/25 11:00:28 by davgalle ### ########.fr */
/* */
/* ************************************************************************** */
#include<string.h>
#include<stdio.h>
#include<unistd.h>
void ft_putchar(char arg[])
{
int i;
i = 0;
while (arg[i] != '\0')
{
i++;
}
write(1, arg, i);
}
int main(int argc, char *argv[])
{
int i;
i = 1;
if (argc > 1)
{
while (i < argc)
{
ft_putchar(argv[i]);
i++;
write(1, "\n", 1);
}
}
return (0);
}