Question: c++ program 2- Write a function SWAP to receive a string (S) and two substrings (S1) and (S2) and to swap (S1) with (S2). Assume

c++ programc++ program 2- Write a function SWAP to receive a string (S)

2- Write a function SWAP to receive a string (S) and two substrings (S1) and (S2) and to swap (S1) with (S2). Assume that (S1) or (S2) exist only once in the string (S) and if either is missing from (S), then no action is taken. For example: S1- "Mary" S2-"Ann" S before:"In the contest, Mary scored First and Ann scored Second." S after:"In the contest, Ann scored First and Mary scored Second

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!