23.
What are unary functors?

24.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class sample
{
    public:
    virtual void example() = 0; 
};
class Ex1:public sample
{
    public:
    void example()
    {
        cout << "ubuntu";
    }
};
class Ex2:public sample
{
    public:
    void example()
    {
        cout << " is awesome";
    }
};
int main()
{
    sample* arra[2];
    Ex1 e1;
    Ex2 e2;
    arra[0]=&e1;
    arra[1]=&e2;
    arra[0]->example();
    arra[1]->example();
}

26.
What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
template<class T>
class A
{
    public:
	T func(T a, T b){
		return a/b;
	}	
};
 
int main(int argc, char const *argv[])
{
	A <char>a1;
	cout<<a1.func(65,1)<<endl;
	cout<<a1.func(65.28,1.1)<<endl;
	return 0;
}

28.
What will be the output of the following C++ code?
#include <iostream>
#include <array>
using namespace std;
int main(int argc, char const *argv[])
{
	array<int,5> arr = {1,2,3,4,5};
	cout<<"Printing Using [] operator: ";
	for(int i=0;i<5;i++){
		cout<<arr[i]<<" ";
	}
	cout<<endl;
	cout<<"Printing Using at() function: ";
	for(int i=0;i<5;i++){
		cout<<arr.at(i)<<" ";
	}
	cout<<endl;
	return 0;
}

30.
How the template class is different from the normal class?