[Solved] Matrix sorting in C
#include <stdio.h> #include <stdlib.h> typedef int(*comparer) (int a, int b); int compareasc ( const void *pa, const void *pb ) { const int *a = *(const int **)pa; const int *b = *(const int **)pb; if(a[0] == b[0]) return a[1] – b[1]; else return a[0] – b[0]; } int comparedsc ( const void *pa, const … Read more