TP_12 exo1: Use a callback in the bubble sort to a compare function
[TD_C.git] / TP_7 / exo1 / exo1.c
index b57e2ac794b94aa56b6209d46d1a23b852f724cf..c3ae354589f55c6abdf52b30554a7fb10c8dd893 100644 (file)
@@ -49,7 +49,6 @@ void sortArray(int* array, int length) {
     do {
         rt = sortFirst(array, length);
     } while (rt);
-
 }
 
 int main() {
@@ -72,8 +71,8 @@ int main() {
 
     printf("\nView array content unsorted:\n");
     displayArray(tab, tab_length);
-    sortArray(tab, tab_length);
     printf("\nNow, sorting the array...\n");
+    sortArray(tab, tab_length);
     printf("\nView array content sorted:\n");
     displayArray(tab, tab_length);