Write a C program that will get three strings from the user. The first will be a
ID: 3654796 • Letter: W
Question
Write a C program that will get three strings from the user. The first will be a string of many words, the second will be a single word that we are going to search for, and the third will be a single word that we want to replace the second word with. The second and third strings have the same length. In your main function do the following: 1) Display the first string 2) Display the second string 3) Display the third string 4) Call function reverseReplace that takes the three above strings, and replaces the found second word with the third one, and then reverse the word order of thestring. 5) Display the first string again. Void reverseReplace(char * str1, char *str2, char *str3). reverseReplace(Explanation / Answer
this program gives better solution for this #include #include using namespace std; int main () { char *line = "short line for testing"; // with no arguments string s1; s1 = "Anatoliy"; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.