Question
Im just getting started with C++ and was stuck on this question, any help would be very appreciated Write a program that reads a string
Im just getting started with C++ and was stuck on this question, any help would be very appreciated
Write a program that reads a string comprised of a number of words and (1) prints the string in reverse order, (2) prints the words in reverse order. eg:
Enter words: This C++ stuff is cool
looc si ffuts ++C sihT
sihT ++C ffuts si looc
Your program must be comprised of a main(), a function called PrintReverseString() and PrintReverseWords() and must use a char array (c-string) for storing the words. Both functions are passed the string in a char array and should print the string or words in reverse order respectively
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started