C++ MQCs with Explanation ( WORKING WITH FILES)

Given below is the definition of a function template template [class T] T mul (x, y) { return x * y; } Identify errors, if any

  1. class T in the first line should be within angle brackets < and >
  2. The type of arguments of mul function must be declared as T
  3. Both a and b
  4. No error



Answer: 
Option c: Both a and b

Explanation Here

Post a Comment

0 Comments