Multiple choice

Templates are used _________.

  1. as decision making statement

  2. to achieve generic programming

  3. to reduce ambiguity

  4. to achieve polymorphism in C++

  5. none of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Templates enable us to define generic classes and functions and thus provide support for generic programming.