// stringmanipex.cpp shows use of string functions

#include <iostream>   
#include <string>

using namespace std;


string str1;
string str2;

int main()
{
 
  str1 = "you ought to start with logic";
  str2 = "ou";

  cout << "a. " << str1.length() << endl;
  cout << "b. " << str1.find(str2) << endl;
  cout << "c. " << str1.substr(4,25) << endl;
  cout << "d. " << str1.substr(4,25).find(str2) << endl;
  cout << "e. " << str1.substr(str1.find("logic"),3) << endl;
  cout << "f. " << str1.substr(24,5).find(str2.substr(0,1)) << endl;
  cout << "g. " << str1.find("end") << endl;


  return 0;
}
