When is a template better solution than a base class??
Answer Posted / mayank kumar
as template is in form of generic class and generic
function so here the class and function works for all. also
in template we can change the data type of function
parameter as well as of the data member present in class.
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is the benefit of encapsulation?
To what does “event-driven” refer?
What is the array and initializing arrays in c++?
Explain function overloading and operator overloading.
Why do we use the using declaration?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
What is the first name of c++?
What do you mean by function and operator overloading in c++?
How is new() different from malloc()?
What is namespace & why it is used in c++?
What is a volatile variable in c++?
Which programming language should I learn first?
Is java as fast as c++?
What jobs can you get with a c++ certification?
Where are setjmp and longjmp used in c++?