-
What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s ("Interview Mania is being legend");
string::iterator itr;
s.erase (s.begin()+ 15, s.end()-7);
cout << s << endl;
return 0;
}
-
- Interview Mania is being legend
- Interview Mania legend
- Interview Mania
- All of above
- None of these
Correct Option: B
In this program, We are leaving the first 15 characters and last 7 characters and we are erasing the remaining the characters.