[Solved]Need Help Asap C Program Ill Post Code Define String Go Prepend Come String Without Using Q37030043
Need help ASAP with this c++ program below ill post what code ihave
Define a string “we have to go”
Prepend “Come on, “ to the string without using the + operator.Output the string.
Append ‘!’ to the end of the string and output the string.
Write a function to find out and return how many times acharacter occurs in the string. Test the function in main( ) for‘o’ and ‘e’.
Write a function to find out what position/s in a string acharacter occurs. Test the function in main( ) for ‘o’ and ‘e’.
Replace “go” with “move on” and output the string.
Write a function to find out and return how many times asubstring occurs in the original string. Test the function in main() for “on”.
my code
#include <iostream>
using namespace std;
int main (){
string str1 = “we have to go”;
str1.insert(0, “Come on, “);
str1.push_back(‘!’);
cout << str1 << endl;
cout << count<< endl;
return 0;
}
Expert Answer
Answer to Need help ASAP with this c++ program below ill post what code i have Define a string “we have to go” Prepend “Come… . . .
OR

