92.
What will be the output of the following C++ code?
#include <iostream>
#include <memory>
#include <algorithm>
using namespace std;
int main ()
{
    int numbers[] = {1, 5, 4, 5};
    pair <int*, ptrdiff_t> result = get_temporary_buffer<int>(4);
    if (result.second > 0)
    {
        uninitialized_copy (numbers, numbers + result.second, result.first);
        sort (result.first, result.first + result.second);
        for (int i = 0; i < result.second; i++)
            cout << result.first[i] << " ";
        return_temporary_buffer (result.first);
    }
    return 0;
}

94.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
struct X;
struct Y 
{
    void f(X*);
};
struct X 
{
    private:
    int i;
    public:
    void initialize(); 
    friend void g(X* , int);
    friend void Y :: f(X*);
    friend struct Z;
    friend void h();
};
void X :: initialize() 
{
    i = 0;
}
void g(X* x, int i) 
{
    x -> i = i;
}
void Y :: f(X * x) 
{
    x -> i = 47;
    cout << x->i;
}
struct Z 
{
    private:
    int j;
    public:
    void initialize();
    void g(X* x);
};
void Z::initialize() 
{
    j = 99;
}
void Z::g(X* x) 
{
    x -> i += j;
}
void h() 
{
    X x;
    x.i = 100;
    cout << x.i;
}
int main() 
{
    X x;
    Z z;
    z.g(&x);
    cout << "Data accessed";
}

95.
What will be the output of the following C++ code?
#include <iostream>
#include <vector>
using namespace std;
int main ()
{
    unsigned int i;
    vector<int> first;
    vector<int> second (4, 100);
    vector<int> third (second.begin(), second.end());
    vector<int> fourth (third);
    int myints[] = {16, 2, 77, 29};
    vector<int> fifth (myints, myints + sizeof(myints) / sizeof(int) );
    for (vector<int> :: iterator it = fifth.begin(); it != fifth.end(); ++it)
        cout << ' ' << *it;
    return 0;
}

97.
What will be the output of the following C++ code?
#include<iostream> 
#include<iterator> 
#include<vector> 
using namespace std; 
int main() 
{ 
    vector<int> ar = { 1, 2, 3, 4, 5 }; 
    vector<int>::iterator ptr = ar.begin(); 
    advance(ptr, 2);
    cout << *ptr << endl; 
    return 0; 
}

98.
Which of the following is correct?

99.
When exceptions are used?