1.

A template class can have _____________(a) More than one generic data type(b) Only one generic data type(c) At most two data types(d) Only generic type of integers and not charactersI have been asked this question in my homework.Question is from Template Class topic in section Classes of Object Oriented Programming

Answer»

Right option is (a) More than one generic data type

Easy explanation - The template class can SUPPORT more than one data type. The only thing is to ADD all the data TYPES required in a LIST separated by comma within template SPECIFICATION.



Discussion

No Comment Found

Related InterviewSolutions