1.

What is the output of this program?
#include &ltiostream>
#include <memory>
#include <string>
using namespace std;
int main ()
{
pair <string*, ptrdiff_t> Res = get_temporary_buffer<string>(5);
if (Res.second > 0)
{
uninitialized_fill ( Res.first, Res.first + Res.second,
"Bye " );
for (int k = 0; k < Res.second; k++)
cout << Res.first[k] ;
return_temporary_buffer(Res.first);
}
return 0;
}

A. Bye
B. Bye Bye Bye
C. Bye Bye Bye Bye Bye
D. Bye Bye
E. Bye Bye Bye Bye
Answer» D. Bye Bye


Discussion

No Comment Found

Related MCQs