Question: 45. Full program question] Write a program that reads a string from the user and outputs a string with its characters reversed. Your program must
45. Full program question] Write a program that reads a string from the user and outputs a string with its characters reversed. Your program must include a function, reverseStr, that takes a string asa parameter and returns the string with its characters reversed. For example, the value of reverseStrf"Hello") is "olleH"; the value of reverseStrf"What a day!") is "lyad a tahW "; the value of reverseStr ("A") is "A. [20 points] To get a full credit, have all the components including comments #include, the prototype ofa function. To get extra credits, implement reverseStr as a recursive one. Hint: You may want to use str.length), str.substr), and I operator of a string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
