#include #include // cstring using namespace std; // find_last_of_strrchr1.cpp int main() { char charray[] = "Here is your C++ Codes sample"; string str1 = "Here is your C++ Code sample"; size_t found;unsigned int n1; // C char * pch1; pch1=strrchr(charray,'s'); cout<<"Last occurence of "<< pch1-charray+1; // C++ find_last_of function found=str1.find_last_of("s"); n1 = found+1; cout << "\n character s found after: " << n1 ; cout<< " \n\t" << str1.substr(0,found) << endl; cout << "\n string " << str1.substr(n1-1) << endl; return 0; }