Implementation of quicksort in C