C/C++ Programming Challenge - try this!
Write a method that takes a string as input, and outputs that string with the words in reverse order. Punctuation should remain in its place (i.e. attached to whatever word it was originally with)
Example:
Input: "My this is a nice day!"
Output "day! nice a is this My"
Example 2:
Input: "There is a house in New Orleans, they call the rising Sun. "
Output "Sun. rising the call they Orleans, New in house a is There"
Puzzle Source: #-Link-Snipped-#