The function should accept three c-string


Write a function named repalceSubstring. The function should accept three C-string or string object arguments. Let's call them string1, string2, and string3. It should search string1 for all occurrences of string2. When it finds an occurrence of string2, it should replace it with string3. For example, suppose the three arguments have the following values:
string1: "The dog jumped over the fence"
string2: "the"
string3: "that"

With these three arguments, the function would return a sting object with the value "that dog jumped over that fence". Demonstrate the function in a complete program.

Include a screen shot showing the program compiles and runs with the output.
If the program does not compile, the screen shot should show the errors.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: The function should accept three c-string
Reference No:- TGS084728

Expected delivery within 24 Hours