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 01:30
What kind of motivation is katrina showing? use the drop-down menu to complete the statement. katrina is using motivation because she is personally interested in learning more.
Answers: 2
question
Computers and Technology, 22.06.2019 04:30
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
question
Computers and Technology, 22.06.2019 07:00
For all machines-not just hammers- the user applies force force to the machine to the machine over a certain distance. a. input b. output c. duo d. none of the above
Answers: 1
question
Computers and Technology, 22.06.2019 08:00
Digital information is stored using a series of ones and zeros. computers are digital machines because they can only read information as on or off –1 or 0. this method of computation is known as the system
Answers: 1
You know the right answer?
Write a function ReplaceSubString that takes three strings as parameters: string1, string2, and stri...
Questions
question
Mathematics, 11.01.2021 06:20
question
Mathematics, 11.01.2021 06:20
question
Mathematics, 11.01.2021 06:20
question
English, 11.01.2021 06:20
question
Health, 11.01.2021 06:20
Questions on the website: 13722362