21.
What will be the output of the following C++ code?
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(int argc, char const *argv[])
{
	vector <int> v = {1,5,23,90,15,35};
	make_heap(v.begin(),v.end());
	cout<<v.front();
}

22.
Which is the following is syntactically correct for vector<int> v?

23.
What will be the output of the following C++ code?
#include <iostream>
#include <complex>
using namespace std;
int main()
{
	complex <double> cn(3.0, 4.0);
	auto cnj = conj(cn);
	cout<<"Conjugate of "<<real(cn)<<"+("<<imag(cn)<<")i is: "<<real(cnj)<<"
        +("<<imag(cnj)<<")i"<<endl;
	return 0;
}

24.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class p 
{
    protected:
    int width, height;
    public:
    void set_values (int a, int b)
    {
        width = a; height = b; 
    }
    virtual int area (void) = 0;
};
class r: public p
{
    public:
    int area (void)
    { 
       return (width * height);
    }
};
class t: public p 
{
    public:
    int area (void)
    {
        return (width * height / 2); 
    }
};
int main () 
{
    r rect;
    t trgl;
    p * ppoly1 = &rect;
    p * ppoly2 = &trgl;
    ppoly1->set_values (4, 5);
    ppoly2->set_values (4, 5);
    cout << ppoly1 -> area() ;
    cout << ppoly2 -> area();
    return 0;
}

27.
What will be the output of the following C++ code?
#include <iostream>
#include <deque>
using namespace std;
int main ()
{
    unsigned int i;
    deque<int> mydeque;
    mydeque.push_back (100);
    mydeque.push_back (200);
    mydeque.push_back (300);
    for(deque<int> :: iterator it = mydeque.begin(); it != mydeque.end(); ++it)
    {
    }
    mydeque.clear();
    mydeque.push_back (110);
    mydeque.push_back (220);
    for(deque<int> :: iterator it = mydeque.begin(); it != mydeque.end(); ++it)
        cout << ' ' << *it;
    cout << '\n';
    return 0;
}

28.
What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()  
{
    int myints[] = {10, 20, 30, 5, 15};
    vector<int> v(myints, myints + 5);
    make_heap (v.begin(), v.end());
    pop_heap (v.begin(), v.end());
    v.pop_back();
    cout << v.front() << '\n';
    return 0;
}

29.
What will be the output of the following C++ code?
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(int argc, char const *argv[])
{
	vector <int> v = {90, 47, 34, 23, 4, 35, 67};
	auto it = is_heap_until(v.begin(), v.end());
	for(auto i = v.begin(); i != it; i++)
		cout<<*i<<" ";
}