Question: Write a short program in C + + with the following functions: void input ( std::string &first, std::string &second ) requests two values of type

Write a short program in C++ with the following functions:
void input(std::string &first, std::string &second)
requests two values of type string from the user, accepting the values from standard input
returns the accepted values by reference
void swap_strings(std: :string &first, std::string &second)
accepts two string reference arguments and swaps the referenced values. In other words, the string stored at the first parameter ends up stored
in the second parameter and the string stored at the second parameter ends up stored in the first parameter.
void output(std: :string &first, std: :string &second)
that prints two strings to the screen with a space between them.
int main()
Uses the input, swap_strings, and output functions to:
Accept two string values from the user.
Print the received strings in their original input order
Print the received strings in reverse of the original order.
Again, print the received strings in their original input order
 Write a short program in C++ with the following functions: void

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!