Solved

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

Question 22

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents