Following function is needed for library function qsort ( ) . Refer www . cplusplus . com / reference / clibrary / cstdlib / qsort /
int comp ( const void * a , const void * b ) { return * ( int * ) a > * ( int * ) b ; }