Exos Part 1 (Ex 0 - 6 + Ex 9)

This commit is contained in:
lclerel- lclerel-
2026-03-10 14:28:28 +01:00
commit 7dc4a73af7
8 changed files with 435 additions and 0 deletions

38
ex9/ft_putstr.c Normal file
View 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);
}*/