-
What is the output of this program?
#include <iostream>
#include <memory>
#include <string>
using namespace std;
int main ()
{
string str[] = {"Interveiw", "Mania"};
pair <string*, ptrdiff_t> Res = get_temporary_buffer<string>(2);
if (Res.second>0)
{
uninitialized_copy ( str, str + Res.second, Res.first );
for (int k = 0; k < Res.second; k++)
cout << Res.first[k] << " ";
return_temporary_buffer(Res.first);
}
return 0;
}
-
- Compilation Error
- Interveiw
- Mania
- Interveiw Mania
- None of these
Correct Option: D
In this program, We are storing the string and retrieving the string by using get_temporary_method.