Class Template Quiz-Asked in Interviews

Placewit
1 min readDec 28, 2021

Which of the following is not correct (in C++)?

A) Class templates and function templates are instantiated in the same way

B)Class templates differ from function templates in the way they are initiated

C)Class template is initiated by defining an object using the template argument

D)Class templates are generally used for storage classes

Solution:

B) C) D) are Correct

In C++ class templates and function templates are similar in the way they are both initiated. Class template are not used for storage class. Class templates and function templates are instantiated in the same way and Class template is not initiated by defining an object using the template.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--