I am learning C and I want to do this specific task. I know there is a number of similar questions and answers, but still... I will try to be more specific. Lets say, I have a file with following lines:
program01
programs
aprogram
1program
prog
5program
And I want now an array with:
1program
5program
aprogram
prog
program01
programs
So there are ONLY latin small letters and numbers in strings, no spaces. I know how to perform some separate steps, but want to get and feel the whole (and proper) concept, so to say. Probably it could make some sorting decisions on the fly when reading from file first? Manual sort is preferred for my particular case, just for the sake of better learning and possible optimisation. Lets say, maximal length of one line is 256, maximal number of lines is 256. Thanks in advance.