aboutsummaryrefslogtreecommitdiff
path: root/c01
diff options
context:
space:
mode:
authorCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-04 21:56:50 +0200
committerCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-04 21:56:50 +0200
commitdbfa9d5d6b8bebde60f714253409ad46e328d358 (patch)
tree7f470d33293979e8c125302f0cf808a0b7df44f3 /c01
parent9675f63eac7a10d1814324067209935de71495cf (diff)
downloadpiscine-dbfa9d5d6b8bebde60f714253409ad46e328d358.tar.gz
piscine-dbfa9d5d6b8bebde60f714253409ad46e328d358.tar.bz2
piscine-dbfa9d5d6b8bebde60f714253409ad46e328d358.zip
c02 ex11 mindfuck solved, c02 test
Diffstat (limited to 'c01')
-rw-r--r--c01/main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/c01/main.c b/c01/main.c
index c0ba1d0..eef75db 100644
--- a/c01/main.c
+++ b/c01/main.c
@@ -1,5 +1,5 @@
#include <stdio.h>
-/*#include <limits.h>*/
+#include <limits.h>
#include "ex00/ft_ft.c"
#include "ex01/ft_ultimate_ft.c"
#include "ex02/ft_swap.c"
@@ -57,16 +57,19 @@ int main()
printf("(23) '%s' length = %d\n", s, ft_strlen(s));
- int t[4] = {1, 2, 3, 4};
+ int t[4] = {1, INT_MAX, INT_MIN, 4};
ft_rev_int_tab(t, 4);
for (int i = 0; i < 4; i++)
printf("%d ", t[i]);
printf("\n");
- int t2[5] = {3, 6, 1, 2, -1};
- ft_sort_int_tab(t2, 5);
- for (int i = 0; i < 5; i++)
+ srand(1);
+ int t2[50];
+ for (int i = 0; i < 50; i++)
+ t2[i] = rand();
+ ft_sort_int_tab(t2, 50);
+ for (int i = 0; i < 50; i++)
printf("%d ", t2[i]);
return 0;