Question: Write c++ function to search substring in the str(string) and return the index from where it starts. DO NOT use any library functions except .length.

 Write c++ function to search substring in the str(string) and return

Write c++ function to search substring in the str(string) and return the index from where it starts. DO NOT use any library functions except .length. #include #include using namespace std; int search_substring(string& sub, string& str) { } int main() { string sub = "my"; string str = "This is my computer"; int i = seach_substring(sub, str); cout

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!