Multiple Choice
In the following function template, what must be true in order to use the function with a given data type?
Template <class T>
Int smallest T array[], int size)
{
Int small=0, i;
Fori=0;i<size;i++)
{
Ifarray[i] < array[small])
Small=i;
}
Return small;
}
A) the data type must be a pre-defined data type
B) the data type must have a < operator defined for it
C) the data type must be numeric
D) the data type must be character based
Correct Answer:

Verified
Correct Answer:
Verified
Q25: If you define some list class template
Q26: If you have a class template declared
Q27: In a class template implementation, every use
Q28: Writing a template class<br>A) allows us to
Q29: If you define a function template, then
Q30: A class template may not use dynamic
Q31: Which of the following is a correct
Q32: When would you want to make a
Q33: The C++ code<br>template <class T><br>is called the
Q35: In a template function definition, all parameters