Given the function below, which of the following are needed to change the function into a function template?
int smallest( int array[], int size)
{
int small=0, i;
for(i=0;i
if(array[i] < array[small])
small=i;
}
return small;
}
a. precede the function definition with template
b. change the type of the array to T
c. change all occurrences of int to T
d. change the type of small to T
e. change the type of i to T
f. All of the above
g. A and B
h. A and C
g. A and B
Computer Science & Information Technology
You might also like to view...
If you have an address field listing the city, state, and ZIP together such as Paterson, NJ 07501, you have violated the first normal form
Indicate whether the statement is true or false
Computer Science & Information Technology
Write a function to set the red, green, and blue values to zero. What is the result?
What will be an ideal response?
Computer Science & Information Technology