Implementation of standarad alogorithms of sorting in C