Given the following search function declaration, what would be the corresponding declaration for a templated search function?

int search( int array[], int start, int target, int size);
//pre: start is > 0, and < size
//the position of the first occurance of target at or after start is returned, or -1 is returned.
a. template
int search(int array[], int start, T target, int size);
b. template
T search(T array[], T start, T target, T size);
c. template
T search(T array[], int start, T target, int size);
d. template
int search(T array[], T start, T target, T size);
e. all of the above
f. none of the above

f. none of the above

Computer Science & Information Technology

You might also like to view...

Which statement about the algorithm we presented in Section 7.10 of the text for shuffling a deck of cards is true?

a) It’s guaranteed to terminate. b) It could execute indefinitely. c) It’s efficient. d) It uses a one-dimensional array of 52 cards.

Computer Science & Information Technology

Which of the following protocols operates at the transport layer of the OSI model?

A) FTP B) TCP C) DNS D) IP

Computer Science & Information Technology