21.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
template <typename T, typename U>
void squareAndPrint(T x, U y)
{
    cout << x << x * x << endl;
    cout << y << " " << y * y << endl;
};
int main()
{
    int ii = 2;
    float jj = 2.1;
    squareAndPrint<int, float>(ii, jj);
}

23.
What will be the output of the following C++ code?
#include <iostream>
#include <list>
using namespace std;
int main ()
{
    list<int> mylist;
    list<int> :: iterator it1, it2;
    for (int i = 1; i < 10; ++i) mylist.push_back(i * 1);
        it1 = it2 = mylist.begin();
    advance (it2, 6);
    ++it1;
    it1 = mylist.erase (it1);
    it2 = mylist.erase (it2);
    ++it1;
    --it2;
    mylist.erase (it1, it2);
    for (it1 = mylist.begin(); it1 != mylist.end(); ++it1)
        cout << ' ' << *it1;
    return 0;
}

24.
What is the use of is_same() function in C++?

25.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class Base
{
    public:
        Base(){}
        ~Base(){}
        protected:
        private: 
};
class Derived:public Base
{
    public:
        Derived(){}
        Derived(){}
        private:
        protected:
};
int main()
{
    cout << "The program exceuted" << endl;
}

27.
What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
using namespace std;
int main ()
{
    cout << min(2, 1) << ' ';
    cout << min('m','m') << '\n';
    return 0;
}

29.
What will be the output of the following C++ code?
#include <iostream>
#include<type_traits>
using namespace std;
class Base
{
  public:
    void function1() {};
    void function2() {};
};
int main()
{
	Base b;
	cout<<sizeof(b);
	return 0;
}

30.
Which of the following(s) is/are the correct way of assigning values to a forward_list f?