This commit is contained in:
Camille Chauvet
2023-05-17 16:45:25 +00:00
commit 29ed24d567
619 changed files with 16119 additions and 0 deletions

12
Test/c07/ex00.c Normal file
View File

@ -0,0 +1,12 @@
#include <stdio.h>
int main()
{
char src[] = "test";
char *dest;
dest = ft_strdup(src);
printf("%s %p \n", src, &src);
printf("%s %p \n", dest, &dest);
}

23
Test/c07/ex01.c Normal file
View File

@ -0,0 +1,23 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int i;
int min;
int max;
int *tab;
if (argc > 2)
{
i = 0;
min = atoi(argv[1]);
max = atoi(argv[2]);
tab = ft_range(min, max);
while (i < max - min)
{
printf("%d, ", *(tab + i));
i++;
}
}
}

20
Test/c07/ex02.c Normal file
View File

@ -0,0 +1,20 @@
#include <stdio.h>
int main(void)
{
int temp1;
int *temp2;
int **tab;
temp1 = 0;
temp2 =&temp1;
tab = &temp2;
printf("%d", ft_ultimate_range(tab, 0, 10));
printf("\n");
for (int ind = 0; ind<10; ind++ )
{
printf("%i, ", (*tab)[ind]);
}
return (0);
}