63 192
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #6491 in C++ for shubham chandak

Question #6491
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.
Expert's answer

#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions