Solved

In the Following Function Template, What Must Be True in Order

Question 34

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions