Computer Science - Object Oriented Programming Using C++ - Discussion


When two types are used in a function template and one is labeled T, the other

[A]. must also be named T
[B]. must be named U
[C]. can be any legal C++ identfier
[D]. it is illegal to have two types

Answer: Option A


No answer description available for this question.

Omar Othman said: (Nov 14, 2011)  
This is wrong, the correct thing is C. More correct is to say (can be any legal C++ identfier other than T).

Vaibhav said: (Mar 29, 2017)  
The correct answer should be 'C'.

Mayank Gupta said: (Aug 20, 2017)  
The answer should be 'C'.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.