2.
What will be the capacity of vector at the end in 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.reserve(50);
    cout<<v.capacity();
    return 0; 
}

3.
What will be the output of the following C++ code?
#include <iostream>
#include <deque>
using namespace std;
int main ()
{
    unsigned int i;
    deque<int> a (3,100);
    deque<int> b (5,200);
    a.swap(b);
    cout << "a contains:";
    for (deque<int>::iterator it = a.begin(); it != a.end(); ++it)
        cout << ' ' << *it;
    cout << "b contains:";
    for (deque<int>::iterator it = b.begin(); it != b.end(); ++it)
        cout << ' ' << *it;
    return 0;
}

4.
What will be the output of the following C++ code?
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
	bitset<8> b1(string("15"));
	cout<<b1;
}

7.
How to handle the exception in constructor?

9.
What will be the output of the following C++ code?
#include <iostream>
#include <typeinfo>
using namespace std;
class Polymorphic {virtual void Member(){}};
int main () 
{
    try
    {
        Polymorphic * pb = 0;
        typeid(*pb);   
    }
    catch (exception& e)
    {
        cerr << "exception caught: " << e.what() << endl;
    }
    return 0;
}

10.
What will be the output of the following C++ code?
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
	bitset<8> b1(95);
	bitset<8> b2 = b1 >> 3;
	cout<<b1<<endl<<b2;
}