printf("4) Compter le nombre d'occurence d'un entier dans le tableau.\n");
printf("5) Compter le nombre d'entiers pairs dans le tableau.\n");
printf("6) Compter le nombre d'entiers impairs dans le tableau.\n");
- printf("7) Quitter.\n");
+ printf("7) Redimensionner le tableau.\n");
+ printf("8) Quitter.\n");
}
int* do_concat(int array[], unsigned* size) {
printf("La valeur %d est presente %d fois dans le tableau\n", search_value, count_tab_element(array, size, search_value));
}
+void do_resize(int array[], unsigned* old_size) {
+ int errno = 0;
+ unsigned new_size = 0;
+
+ errno = prompt_value("\nNouvelle taille?", (int*)&new_size);
+ handle_prompt_error(errno);
+ array = resize_tab(array, *old_size, new_size);
+ *old_size = new_size;
+}
+
void display_array(int array[], unsigned size) {
if (array != NULL) {
printf("\n--array begin--\n");