Selection Sort algorithm in C