1.

What is the output of this program?
#include <iostream>
using namespace std;
template<class T = float, int k = 5> class N
{
public:
N();
int value;
};
template<> class N<>
{
public: N();
};
template<> class N<double, 10>
{
public: N();
};
template<class T, int k> N<T, k>::N() : value(k)
{
cout << value;
}
N<>::N()
{
cout << " Out of ";
}
N<double, 10>::N()
{
cout << "10" << endl;
}
int main()
{
N<int, 8> x;
N<> y;
N<double, 10> z;
}

A. 10 out of 8
B. 8
C. 10
D. 8 out of 10
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs