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++ program
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
Get step-by-step solutions from verified subject matter experts
