-
What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s="Manjesh Ojha founded the Interview Mania";
string s2 = s.substr (0, 12);
unsigned pos = s.find("the");
string s3 = s.substr (pos);
cout << s2 << ' ' << s3 << '\n';
return 0;
}
-
- Manjesh Ojha founded the Interview Mania
- Manjesh Ojha
- Interview Mania
- founded
- Manjesh Ojha the Interview Mania
Correct Option: E
In this program, We are finding the substring of the string by using the substr function.