-
What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s1;
string s2="Manjesh Ojha";
string s3="He founded Interview Mania";
s1.append(s2);
s1.append(s3, 2, 4);
s1.append(s3.begin() + 6, s3.end());
s1.append(5, 0x2E);
cout << s1 << '\n';
return 0;
}
-
- Manjesh Ojha
- He founded Interview Mania
- Manjesh Ojha founded Interview Mania.....
- Compilation Error
- None of these
Correct Option: C
In this program, We are characters to the string, So the output will as follows.