12.
What will be the output of the following C++ code?
#include <typeinfo>
#include <iostream>
using namespace std;
class A
{
    public:
    virtual ~A();
};
int main() 
{
    A* a = NULL;
    try 
    {
        cout << typeid(*a).name() << endl; 
    }
    catch (bad_typeid)
    {
        cout << "Object is NULL" << endl;
    }
}

13.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class student
{
    public:
    int rno , m1 , m2 ;
    protected:
    void get()
    {
        rno = 15, m1 = 10, m2 = 10;
    }
};
class sports
{
    public:
    int sm;
    void getsm()
    {
        sm = 10;
    }
};
class statement : public student, public sports
{
    int tot, avg;
    public:
    void display()
    {
        tot = (m1 + m2 + sm);
        avg = tot / 3;
        cout << tot;
        cout << avg;
   }
    void setObject()
    {
        get();
    }
};
int main()
{
    statement obj;
    obj.setObject();
    obj.getsm();
    obj.display();
}

16.
What will be the output of the following C++ code?
#include <iostream> 
#include <vector> 
 
using namespace std; 
 
int main() 
{ 
    vector<int> v; 
 
    for (int i = 1; i <= 5; i++) 
        v.push_back(i); 
    v.resize(4);
	for (auto it = v.begin(); it != v.end(); it++) 
        cout << *it << " "; 
    return 0; 
}

17.
What are Bi-directional iterators?

19.
What will be the output of the following C++ code?
#include <iostream>  
#include <utility>
#include <string>
 
using namespace std;
 
int main () 
{
  pair <int,int> p1(1,2);
  pair <int,int> p2(3,4);
  if(p1 <= p2)
  	cout<<"P1 is small";
  else
  	cout<<"P2 is small";
  return 0;
}

20.
What is the use of reset() function?