Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a function which takes one string variable (not C string) as input and app

ID: 3631140 • Letter: W

Question

Write a function which takes one string variable (not C string) as input and appends additional information to the existing string. The function must get a first and last name from the user and add them to the original string so the final string appears as follows:

original_string_content|first_name|last_name

You must add the '|' character to the string as shown. Use an appropriate parameter passing mechanism. Do not write a main function. Make sure to properly format all your code.

Explanation / Answer

here is the function u wantit will take a string as a parameter and i is called by reference and the tow first and last strings with the the tow " | | " will be added to it PLEASE RATE void add_string(string &N){string first,last;cin>>first>>last;N=N+"|"+first+"|"+last;}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote