Answer to Question #32781 in C++ for Jay

Question #32781
Write a recursive function void reverse() that reverses a sentence.
For example:

Sentence greeting = new Sentence("Hello!");
greeting.reverse();
cout << greeting.get_text() << "\n";

prints the string "!olleH". Implement a recursive solution by removing the first
character, reversing a sentence consisting of the remaining text, and combining the
two.
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS