ebf92c525a78f4a5178f3bd1ac6bb3f876d270ab
[TD_C.git] / TP_13 / exo1 / lib / array.h
1 #ifndef ARRAY_H
2 #define ARRAY_H
3
4 #include <stdbool.h>
5
6 #include "sort.h"
7
8 typedef bool(*count_criteria_cb)(int a);
9
10 bool is_even(int a);
11 bool is_odd(int a);
12
13 int* create_tab(int tab[], unsigned tab_size);
14 void free_tab(int tab[]);
15 int* concat_tab(int tab1[], unsigned tab_size1, int tab2[], unsigned tab_size2);
16 int* resize_tab(int tab[], unsigned tab_size);
17 unsigned count_tab_element(int tab[], unsigned tab_size, int element);
18 unsigned count_tab_criteria(int tab[], unsigned tab_size, count_criteria_cb c_criteria);
19 void sort_tab(int tab[], unsigned tab_size, criteria_cb criteria);
20
21 #endif /* ARRAY_H */