repositories
/
TD_C.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TP_12 exo1: Use a callback in the bubble sort to a compare function
[TD_C.git]
/
TP_7
/
exo1
/
exo1.c
diff --git
a/TP_7/exo1/exo1.c
b/TP_7/exo1/exo1.c
index b57e2ac794b94aa56b6209d46d1a23b852f724cf..c3ae354589f55c6abdf52b30554a7fb10c8dd893 100644
(file)
--- a/
TP_7/exo1/exo1.c
+++ b/
TP_7/exo1/exo1.c
@@
-49,7
+49,6
@@
void sortArray(int* array, int length) {
do {
rt = sortFirst(array, length);
} while (rt);
do {
rt = sortFirst(array, length);
} while (rt);
-
}
int main() {
}
int main() {
@@
-72,8
+71,8
@@
int main() {
printf("\nView array content unsorted:\n");
displayArray(tab, tab_length);
printf("\nView array content unsorted:\n");
displayArray(tab, tab_length);
- sortArray(tab, tab_length);
printf("\nNow, sorting the array...\n");
printf("\nNow, sorting the array...\n");
+ sortArray(tab, tab_length);
printf("\nView array content sorted:\n");
displayArray(tab, tab_length);
printf("\nView array content sorted:\n");
displayArray(tab, tab_length);