1.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
double division(int a, int b)
{
    if (b == 0)
    {
        throw "Division by zero condition!";
    }
    return (a / b);
}
int main ()
{
    int x = 50;
    int y = 0;
    double z = 0;
    try 
    {
        z = division(x, y);
        cout << z << endl;
    }
    catch (const msg) 
    {
        cerr << msg << endl;
    }
    return 0;
}

6.
Given the below class, what is the correct syntax of declaring a functor that adds 10 to each of the passed argument?
class Add
{
	int x;
   public:
	Add(int x){
		this->x = x;
	}
	int operator()(int a){
		return x+a;
	}
};

8.
What is the correct syntax of constructing any using assignment operator?

10.
What will be the output of the following C++ code?
#include <stdexcept>
#include <limits>
#include <iostream>
using namespace std;
void func(int c)
{
    if (c < numeric_limits<char> :: max())
        throw invalid_argument("MyFunc argument too large.");
    else
    {
        cout<<"Executed";
    }
}
int main()
{
    try
    {
        func(256);
    }
    catch(invalid_argument& e)
    {
        cerr << e.what() << endl;
        return -1;
    }
    return 0;
}