1.

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;
}

A. my life
B. Coding is my life
C. Coding is my
D. Compilation Error
E. None of these
Answer» D. Compilation Error


Discussion

No Comment Found

Related MCQs