Q481
What will be the output of the following C++ code? #include using namespace std; template class XYZ public: void putPri(); static T ipub; private: static T ipri; ; template void XYZ ::putPri() cout T XYZ ::ipub = 1; template T XYZ ::ipri = 1.2; int main() XYZ a; XYZ b; a.putPri(); cout << a.ipub << endl; b.putPri();
A.
1
B.
1.2
C.
1
1.2
1.2
D.
1
1
1.2
Answer1
1.2
Answer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board