Answer to Question #6491 in C++ for shubham chandak
WAP to find the starting position of the sub string in the main string.for eg: the position of "abc(substring)" in "scabc(main string)" is 3.
1
2012-02-14T10:04:34-0500
#include <string>
#include <iostream>
using namespace std;
int main ()
{
string a, b;
cin>>a>>b;
cout<<a.find(b);
system ("pause");
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment