1
0

first commit

This commit is contained in:
KeyZox
2023-08-06 20:12:38 +02:00
parent 1fe062c970
commit eb6b113e51
125 changed files with 2987 additions and 0 deletions

6
ended/C01/ex00/ft_ft.c Normal file
View File

@ -0,0 +1,6 @@
#include <stdio.h>
void ft_ft(int *nbr)
{
*nbr = 42;
}

View File

@ -0,0 +1,6 @@
#include <stdio.h>
void ft_ultimate_ft(int *********nbr)
{
*********nbr = 42;
}

10
ended/C01/ex02/ft_swap.c Normal file
View File

@ -0,0 +1,10 @@
#include <stdio.h>
void ft_swap(int *a, int *b)
{
int f;
f = *a;
*a = *b;
*b = f;
}

View File

@ -0,0 +1,7 @@
#include <stdio.h>
void ft_div_mod(int a, int b, int *div, int *mod)
{
*div = a / b;
*mod = a % b;
}

View File

@ -0,0 +1,12 @@
#include <stdio.h>
void ft_ultimate_div_mod(int *a, int *b)
{
int f;
int g;
f = *a;
g = *b;
*a = f / g;
*b = f % g;
}

View File

@ -0,0 +1,13 @@
#include <unistd.h>
void ft_putstr(char *str)
{
int i;
i = 0;
while (str[i])
{
write(1, &str[i], 1);
i++;
}
}

View File

@ -0,0 +1,11 @@
int ft_strlen(char *str)
{
int i;
i = 0;
while (str[i] != '\0')
{
i++;
}
return (i);
}