Vidyalelo
C++ Programming · Q39

Functions and Procedures in C++

Programming · C++ Programming · question 39

Q39

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; }
Answer
C.
returnType functionName(template T parameter) { body; }
D.
None of the above

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board