42.
What will be the output of the following C++ code?
#include <iostream>
#include <iomanip>
using namespace std;
void showDate(int m, int d, int y)
{
    cout << setfill('0');
    cout << setw(2) << m << '/'
    << setw(2) << d << '/'
    << setw(4) << y << endl;
}
int main()
{
    showDate(1, 1, 2013);
    return 0;
}

44.
What will happen if the iterator is unchecked?

45.
What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
template<class T, class U = char>
class A
{
	T a;
	U b;
    public:
	A(T a_val, char b_val = '$'){
		this->a = a_val;
		this->b = b_val;
	}
	void print(){
		cout<<a<<' '<<b<<endl;
	}
};
 
int main(int argc, char const *argv[])
{
	A <int, int> a1(5,10);
	A <int> a2(5);
	A <float> a3(10.0);
	a1.print();
	a2.print();
	a3.print();
	return 0;
}

46.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
void Division(const double a, const double b);
int main()
{
    double op1=0, op2=10;
    try 
    {
        Division(op1, op2);
    }
    catch (const char* Str)
    {
        cout << "\nBad Operator: " << Str;
    }
    return 0;
}
void Division(const double a, const double b)
{
    double res;
    if (b == 0)
       throw "Division by zero not allowed";
    res = a / b;
    cout << res;
}

47.
What will be the output of the following C++ code?
#include <iostream>
#include <functional>
#include <numeric> 
using namespace std;
int myaccumulator (int x, int y) 
{
    return x - y;
}
int myproduct (int x, int y) 
{
    return x + y;
}
int main () 
{
    int a = 100;
    int series1[] = {10, 20, 30};
    int series2[] = {1, 2, 3};
    cout << inner_product(series1, series1 + 3, series2, a ,myaccumulator, 
    myproduct);
    cout << endl;
    return 0;
}