selection sort in C