Vidyalelo
C++ Programming · Q384

C++ miscellaneous

Programming · C++ Programming · question 384

Q384

What will be the output of the following C++ code? #include using namespace std; template class A public: A(); int value; ; template<> class A<> public: A(); ; template<> class A public: A(); ; template A ::A() : value(i) cout ::A() cout ::A() cout x; A<> y; A z;

A.
6
B.
10
C.
6default10
Answer
D.
6default

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board