Update Ex6
This commit is contained in:
38
ex9/ft_putstr.c
Normal file
38
ex9/ft_putstr.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_putstr.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: lclerel- <lclerel-@learner.42.tech> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/03/10 14:04:52 by lclerel- #+# #+# */
|
||||
/* Updated: 2026/03/10 14:21:43 by lclerel- ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_putchar(char chara)
|
||||
{
|
||||
write(1, &chara, 1);
|
||||
}
|
||||
|
||||
void ft_putstr(char *str)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (str[i])
|
||||
{
|
||||
ft_putchar(str[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
/*int main(void)
|
||||
{
|
||||
char str[] = "Test_Lumi";
|
||||
|
||||
write(1, "Test avec Test_Lumi : ", 24);
|
||||
ft_putstr(str);
|
||||
}*/
|
||||
Reference in New Issue
Block a user