Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What are templates? where we should use it?

Answers were Sorted based on User's Feedback



What are templates? where we should use it?..

Answer / prabhatkr09

Template allow us to write one function and class that works for different datatype .

Use :

Create a type safe collection class that can operate on data of any type.

add extra type checking for function.

Is This Answer Correct ?    6 Yes 1 No

What are templates? where we should use it?..

Answer / satheeshkumar

Template allow us to write one function and class that
works for different datatype .

Use :

Create a type safe collection class that can operate on
data of any type.

add extra type checking for function.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C++ General Interview Questions

Generally variables are stored in heap memory. When he variables are created in stack?

4 Answers   Persistent,


How do you write a function that can reverse a linked-list?

0 Answers  


Explain how a pointer to function can be declared in C++?

0 Answers  


What is a mutex and a critical section.Whats difference between them?How do each of them work?

4 Answers   CTS,


What is the this pointer?

0 Answers  


How can I learn c++ easily?

0 Answers  


Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);

2 Answers  


What are separators in c++?

0 Answers  


Mention the purpose of istream class?

0 Answers  


What is #include cstdlib in c++?

0 Answers  


What is a static member?

0 Answers  


What are the differences between new and malloc?

0 Answers  


Categories