Answer Posted / aboelella
Template is used to optimize code
instead of implementing the same code for multiple data
types, template works as a way to declare classes and
functions and then to be implemented with different data types
It is dependent on the data structure used to substitute the
template
| Is This Answer Correct ? | 18 Yes | 0 No |
Post New Answer View All Answers
State the difference between delete and delete[].
What is a far pointer? where we use it?
What is std :: flush?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
Explain pass by value and pass by reference.
Is it possible to have a recursive inline function in c++?
What is difference between malloc()/free() and new/delete?
Is c++ map a hash table?
How do you invoke a base member function from a derived class in which you’ve overridden that function?
What is lambda expression c++?
How do you define/declare constants in c++?
When does a 'this' pointer get created?
Can constructor be static in c++?
What is void pointer in c++ with example?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?