1. Home
  2. Computer Science MCQs
  3. C++ and Object-Oriented Programming
  4. Which keyword introduces a generic function or class in C++?

Added 30 Nov -0001

Which keyword introduces a generic function or class in C++?

  1. generic
  2. typename class
  3. virtual
  4. template Correct answer

Correct answer

D. template

11 views

MCQSEXAM

Explanation

template lets the same code work for different types through generic parameters.

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More C++ and Object-Oriented Programming MCQs

Practise all C++ and Object-Oriented Programming MCQs

Similar MCQs