Vidyalelo
C++ Programming · Q273

C++ miscellaneous

Programming · C++ Programming · question 273

Q273

What will be the output of the following C++ code? #include using namespace std; template class A public: A(int a): x(a) protected: int x; ; template class B: public A public: B(): A ::A(100) cout test; return 0;

A.
100
B.
200
Answer
C.
error
D.
runtime error

Answer: Option B

Solution

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