Select the correct option to test your answer:
Computer
Plus Plus Miscellaneous
Difficulty: Medium
What will be the output of the following C++ code? #include <iostream> using namespace std; template <class T> class XYZ { public: void putPri(); static T ipub; private: static T ipri; }; template <class T> void XYZ<T>::putPri() { cout << ipri++ << endl; } template <class T> T XYZ<T>::ipub = 1; template <class T> T XYZ<T>::ipri = 1.2; int main() { XYZ<int> a; XYZ<float> b; a.putPri(); cout << a.ipub << endl; b.putPri(); }
More Computer Questions
Which among the given function causes abnormal program termination ?
OCR stands for____________?
What is the average-case time complexity of interpolation search when the data is uniformly distributed?
What is the purpose of the `@WebInitParam` annotation in a servlet declaration?
What are the decimal and hexadecimal equivalents for the binary number 10110111 ?