There is a text that is read line by line from the file. It is necessary to find the smallest words (precisely words, since there may be many of them) that are present in this text. You can in any language, I'll figure it out. At least a small example. In general, the main question is how to find these words?
I read lines line by line from a file. Let him find the smallest words in the line. How to save them? Take to create a dynamic array? OK. I read the second line. Let her have even smaller words. Then how next? Free the memory of the array and fill it again? Or can read the entire file entirely and work with the entire file at the same time? What is the best algorithm to make?