It's not complicated:
1) Read the lines from the input file, one by one.
2) Convert each value to a number, and store it in an array (depending on your skill level, it may be simpler to read the file twice: once to get the number of lines so you know how big an array to allocate, then again to fill the array).
3) Sort the array. You can write your own function, or use the
qsort function[
^] from the C standard library.
4) Write each array element to a new file.
None of this is complicated, and it's all stuff you have probably done in previous exercises. If you are having problems getting started at all, then this may help:
How to Write Code to Solve a Problem, A Beginner's Guide[
^]