Vidyalelo
C++ Programming · Q806

C++ miscellaneous

Programming · C++ Programming · question 806

Q806

What will be the output of the following C++ code? #include #include using namespace std; template class A T x; U y; ; int main() A a; A b; cout << sizeof(a) << endl; cout << sizeof(b) << endl; return 0;

A.
2
8
Answer
B.
8
2
C.
1
4
D.
4
1

Answer: Option A

Solution

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