Simple sorting program in C