How to declare a template?

a) tem
b) temp
c) template<>
d) temp()

1 thought on “How to declare a template?”

  1. c
    Explanation: template syntax is used.
    An example for calculating max of two ints, floats, doubles, or any other number type where T indicates the type of the parameters passes.
    T max(T a, T b){
    return a > b? a : b;

Leave a Comment