What is a template?
Answers were Sorted based on User's Feedback
Answer / yughandhar
templates r used to create generic classes and functions.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / ravinandan
Template is used for generic programming. In other words
when you want to write a function or a class type
independent, go for templates.
template<class T>
void fun(T x, T y); // Is a Template function
template<typename T>
class abc{
T m;
}; // Is a Class Template
template<class T>
class abc{
T m;
}; // Is a Class Template
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / p suresh kumar
The template specifies a set of parameterized classes or
functions.
| Is This Answer Correct ? | 7 Yes | 3 No |
Answer / yughandhar
Templates is one of the features added to c++ recently.a
template can be considered as a kind of macro.
Templates are mainely used for creating the generic classes
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / debika mohapatra
Templates is one of the features added to c++ recently.a
template can be considered as a kind of macro.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rakesh kumar
Templates is one of the features added to c++ recently.a
template can be considered as a kind of macro.
Templates are mainely used for creating the generic classes
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / yughandhar
template is a kind of macro to create generic classes and
generic functions to do a specific task
| Is This Answer Correct ? | 1 Yes | 1 No |
should we use linear search or binary search if elements are placed in random order or mixed?in both cases? i need a little bit detail ans?thnks
Why do pointers exist?
What is multiple inheritance ?
17 Answers Blue Star, C DAC, CDAC, Impetus, Ness Technologies, Softvision Solution,
What do you mean by Encapsulation?
create a class complex having real and imaginary part of a complex no. as a data member. overload the binary operators(+,- and *) to perform the operations on complex no. objects. overload binary operator using friend function.
2 Answers CTS, Delhi University,
how to create thread in java?
17 Answers IBM, Infosys, Wipro,
What is encapsulation c#?
What is the point of polymorphism?
What is polymorphism? Explain with an example.
What do you mean by public, private, protected and friendly?
What is the difference between the c++ & java?
What is a class?
32 Answers Infosys, TCS, Thylak,