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
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
Define stacks. Provide an example where they are useful.
What is an object in c++?
What is private public protected in c++?
What is the error in the code below and how should it be corrected?
Explain Memory Allocation in C/C++ ?
What is a class definition?
How do you invoke a base member function from a derived class in which you’ve overridden that function?
What is c++ w3school?
What is the first name of c++?
How compile and run c++ program in turbo c++?
Why is c++ called oops?
Should a constructor be public or private?
In what situations do you have to use initialization list rather than assignment in constructors?