Class Template Quiz-Asked in Interviews

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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store