A template can be instantiated by
-
Explicit Instantiation
-
Implicit instantiation
-
Both A and B
-
None of the Above
C
Correct answer
Explanation
Templates can be instantiated both explicitly and implicitly. Implicit instantiation occurs when you use a template with specific types and the compiler generates the code automatically. Explicit instantiation happens when you explicitly tell the compiler to instantiate a template with specific types using template<> syntax.