Answer:Consider the declaration of a template non-type argument in the following code snippet:
template <class temp, int max> class sample
{
temp a[max];
static int b=50;
// ………
}
Which of the following statement(s) does not invoke the above template correctly?
I. sample<float, 10*10> x;
II. sample<float, 30>20> x;
III. sample<float, (30>20)> x;
IV. sample<float, 10.0> x;
Options
a) I only
b) III only
c) Both II and IV
d) Both I and III
Answer : c) Both II and IV