Logic:-
Like reverse string, this is a reverse sentence. So first we are taking an input from the user after that we are finding the string or sentence last index point so we can reverse a sentence while reversing a sentence if any space occurs we take and space and print space after that again string starts printing. I strongly prefer a program first try to understand this program so can understand the logic basically what is going on.
Now try by yourself if you are getting problem Comment Below and also sure that you have read the full post.
Output:
=====================================
Visit - www.nerdutella.com
=====================================
Enter The Sentence: c++ programming
Sentence In Reverse Order Is As Follow
programming c++
need an explanation for this answer? contact us directly to get an explanation for this answer