Templates simulate which of the following feature?

Hằng Đoàn

New member
Templates simulate which of the following feature?
A. Polymorphism
B. Abstraction
C. Encapsulation
D. Inheritance
 
Answer: a
Explanation: Template function helps in writing functions that work with different types of parameters which is what polymorphism means i.e. using same function prototype to perform the same operations on different types of parameters.
 

Tìm kiếm

Back
Top