There is a string, for example, "A simple example of a string to test the operation of an algorithm, a survey."
There is such a combination of "pro"
At the output you need to get the following words: "Simple poll check" Part of the algorithm must be made recursive.
As I understand it - you first need to break the line into words, replacing the spaces '\ 0'. It is necessary to somehow get pointers to words - but then I had a hitch.
Next you need to create an array of possible combinations, i.e. "about rpg opr orp ro pore".
And at the end, compare each word from an array of combinations of characters to a string, but this is not very effective.