Question: Given string workStr on one line, string newStr on a second line, and string strSelection on a third line, insert the contents of newStr in
Given string workStr on one line, string newStr on a second line, and string strSelection on a third line, insert the contents of newStr in workStr right before the first occurrence of strSelection.
Ex: If the input is:
FuzzyBear
Wuzzy
Be
then the output is:
FuzzyWuzzyBear #include
#include
using namespace std;
int main
string workStr;
string newStr;
string strSelection;
getlinecin workStr;
getlinecin newStr;
getlinecin strSelection;
Your code goes here
cout workStr endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
