Friday, February 27, 2015

What is a template?

Question:What is a template??

Answer: Templates allow to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until certain point they fulfill the functionality of a macro. Its prototype is any of the two following ones: <br /> <p>template identifier> function_declaration; template identifier> <br /> function_declaration;</p><br /> <p>The only difference between both prototypes is the use of keyword class or <br /> typename, its use is indistinct since both expressions have exactly the same <br /> meaning and behave exactly the same way. </p>

Tags:Interview Questions, Languages, C++,

Please submit your Interview Answer for the above Question via replying to this post. Thank you for visiting to our blog, Have a Good Day!.



Sponsor Advertisement



School Administration Software

School Management System Software

This is One of the best School management system software in the world. School Software offers complete professional institute management system administration, library, accounting, inventory, etc for all the school activities management...

No comments:

Post a Comment