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