[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Technical Discussion :: C++

106 / 187

What is function templates?

Answer:

Like class template, we can also define function templates that would be used to create a family of function with different argument types.
Syntax:
Template
return type function name(argument of type T)
{
………..
//body of function
//with type T
//wherever appropriate
}

We must use the template parameter T as and when necessary in the function body and in its arguments list.

Asked In :: Sopra Steria

Post Your Answer Here:


Rate This: +0 -0     
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Most Popular Qs.