adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    #include <memory>
    #include <string>
    using namespace std;
    int main ()
    {
        string numbers[] = {"steve", "jobs"};
        pair <string*, ptrdiff_t> result = get_temporary_buffer<string>(2);
        if (result.second>0) 
        {
            uninitialized_copy ( numbers, numbers + result.second, result.first );
            for (int i = 0; i < result.second; i++)
                cout << result.first[i] << " ";
            return_temporary_buffer(result.first);
        }
        return 0;
    }

a.

steve

b.

jobs

c.

jobs steve

d.

steve jobs

Answer: (d).steve jobs

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?