what is the use of template classes in c++



what is the use of template classes in c++..

Answer / ags

Templates are used to avoid the repetition of similar
functions in any class.

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is polymorphism ? Explain with examples

8 Answers   Ness Technologies,


what is the sylabus for priliminaries?

0 Answers  


what is the need of abstraction? what is abstraction?what is the abstraction for stack?

8 Answers   CTS, Verizon,


suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?

3 Answers   EA Electronic Arts,


What are objects in oop?

0 Answers  






class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

0 Answers  


Why a "operator=(...)" when there is a copy ctor?

2 Answers  


What is Dynamic Polymorphism?

13 Answers  


What are the benefits of polymorphism?

0 Answers  


#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; a.x = 22; int c = a.x; int *b = new int; cout << c; return 0; } option: No output 0 22 -(11) Will not compile

1 Answers   CTS, Wipro,


What are the benefits of oop?

0 Answers  


Plese get me a perfect C++ program for railway/airway reservation with all details.

0 Answers   ITM,


Categories