Examveda

What is the correct syntax for defining a function template in C++?

A. returnType functionName(T parameter) { template body; }

B. template returnType functionName(T parameter) { body; }

C. returnType functionName(template T parameter) { body; }

D. None of the above

Answer: Option B


Join The Discussion

Related Questions on Functions and Procedures in C plus plus