subject

Write a function ReplaceSubString that takes three strings as parameters: string1, string2, and string3 and modifies one or more substrings of string1.The function should search string1 for all occurrences of string2. When it finds an occurrence of string2, it should replace it with string3 and save the result in a new string string4.For example, suppose the three strings have the following values:String1: "the dog jumped over the fence"String2: "the"String3: "that"The new string object will have the value "that dog jumped over that fence".Write a main program to test your function. Your main program should:- read three strings from the user: string1, string2, and string3 (You may use the string values provided above)- call the function ReplaceSubString to modify string1- display the new string. Note:- You should make sure string2 and string3 are not the same.- You may use string member functions such as find, replace…

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
What is the algorithm for building a binary tree program
Answers: 2
question
Computers and Technology, 22.06.2019 16:10
Drag each label to the correct location on the imagelist the do’s and don’ts of safeguarding your password.keep yourself loggedin when you leave your computer.don’t write your password down and leave it whereothers can find it.share your password with your friends.each time you visit a website,retain the cookies on your computer.use a long password with mixed characters.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
You know the right answer?
Write a function ReplaceSubString that takes three strings as parameters: string1, string2, and stri...
Questions
question
Social Studies, 29.01.2020 19:42