Practice mode C++

Which C++ feature lets you write one function or class that works with many data types?

Correct answer D. Templates

Explanation

Templates support generic programming; for example template T max(T a, T b) works for int, double and other types.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.