Vidyalelo
C++ Programming · Q769

C++ miscellaneous

Programming · C++ Programming · question 769

Q769

What is the syntax of an explicit call for a template? Assume the given template function. template void func(T a, U b) cout<<a<<" "<<b<<endl;

A.
func<int,char>(3,'a');
Answer
B.
func(3,'a')<int,char>;
C.
<int,char>func(3,'a');
D.
func(<int>3,<char>'a');

Answer: Option A

Solution

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