Multiple choice

Which of the following is involved in implementation of the concept of generic programming?

  1. Virtual functions

  2. Strings

  3. Templates

  4. Operator overloading

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

Templates are used to implement generic programming. They are of two types: function templates and class templates. Function templates are methods that can operate on any data type and class template can be used to write single code for multiple data types.