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...

____ are created, stored, and automatically saved in the Actions panel.

A. Methods B. Actions C. Action Files D. Events

Computer Science & Information Technology

NUR is based on the idea that ________.

a) a page that has not been recently used is likely to be used in the near future b) a page that has not been recently used is not likely to be used in the near future c) a page that has been recently used is not likely to be used in the near future d) none of the above

Computer Science & Information Technology

public static int func1(int m, int n) {    if (m == n || n == 1)        return 1;    else         return func1(m - 1, n - 1) + n * func1(m - 1, n);}What precondition must exist in order to prevent the code in the accompanying figure from infinite recursion?

A. m >= 0 and n >= 0 B. m >= 0 and n >= 1 C. m >= 1 and n >= 0 D. m >= 1 and n >= 1

Computer Science & Information Technology

The internal data model in a Power View sheet can be modified, but only outside of the Power View sheet

Indicate whether the statement is true or false.

Computer Science & Information Technology