various sorting algorithms in c