Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions
Technical Discussion :: C++

111 / 184

What are the benefits of templates?

Answer:

• Templates allow implementing the concept of generic programming.
• Template allows us to generate a family of classes or a family of functions to handle different data types.
• Template classes and functions eliminate code duplication for different types and thus make the program development easier and more manageable.
• We can use multiple parameters in both the class templates and function templates.
• Like other functions, templates can be overloaded.

Asked In ::

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.