Q845
What will be the output of the following C++ code? #include #include #include using namespace std; template class A T a; U b; public: A(T a_val, char b_val = ' ') this->a = a_val; this->b = b_val; void print() cout a1(5,10); A a2(5); A a3(10.0); a1.print(); a2.print(); a3.print(); return 0;
A.
5 10
5 $
10 $
Answer5 $
10 $
B.
Nothing
C.
Error
D.
Segmentation fault
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board