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, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
What is a loop? a. a collection of function definitions at the top of a program b. a line of code that defines a variable and assigns it a value c. a program that opens the turtle graphics window d. a block of code that repeats a specific number of times
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
An npn transistor is correctly biased and turned on if the a. base is negative. b. collector is negative. c. collector is positive with respect to the emitter and negative with respect to the base. d. collector is the most positive lead followed by the base.
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Select all that apply. what two keys listed below should you use to enter data in an excel worksheet? tab backspace enter right arrow
Answers: 2
You know the right answer?
Write a function ReplaceSubString that takes three strings as parameters: string1, string2, and stri...
Questions
question
Mathematics, 25.02.2021 21:50
question
Chemistry, 25.02.2021 21:50
question
Chemistry, 25.02.2021 21:50
Questions on the website: 13722361