I need some help with this particular code. I do not really understand it to its fullest. Could someone take the time and explain it to me? What it does is take a word and p
It is indeed a bit difficult to get; the reversal by recursion works by recursively getting more and more characters from the input until some terminal symbol ' ' is entered. The input is stored implicitly on the stack, until it is printed at the termination of each recursive call of reverse.
Note that the characters are only printed to the output, but they are not stored anywhere for later access; they cannot be obtained again as soon as the first call of reverse terminates.