NTT DATA interview question

How to perform selective sort in C?