Consider a function template as shown below: template < class T > int find (T*array, T n, int m) { for ( int i = o; i < m; i++) if (array [i] = = n return i; return (-1); } Which one of the following prototype calls can generate a function?
- find (int*, float, int);
- find (T*, int, int);
- find (int*, int, float);
- find (float*, float, int);
Answer:
Option b: find (T*, int, int);
Explanation Here
0 Comments