heapSort in C