Last active
November 11, 2019 16:03
-
-
Save parzibyte/7dfa2af558e9a2edf3ea5e13227b118d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int funcionQueCompara(const void *a, const void *b) { | |
// Castear a enteros | |
int aInt = *(int *) a; | |
int bInt = *(int *) b; | |
// Al restarlos, se debe obtener un número mayor, menor o igual a 0 | |
// Con esto ordenamos de manera descendente | |
return bInt - aInt; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment