-
What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s ("Coding is my life");
unsigned sz = s.size();
s.resize (sz + 2, '+');
s.resize (13);
cout << s << '\n';
return 0;
}
-
- my life
- Coding is my life
- Coding is my
- Compilation Error
- None of these
Correct Option: C
In this program, We are resizing the string by adding + and then we are resizing it to 13.