Vidyalelo
C++ Programming · Q531

C++ miscellaneous

Programming · C++ Programming · question 531

Q531

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

A.
16
24
Answer
B.
24
16
C.
Error
D.
Segmentation fault

Answer: Option A

Solution

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