Implementing Sorting Algorithms using C