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 is a template in c++?

Answer Posted / glibwaresoftsolutions

In this set of fresher-level C++ interview questions, a common topic in C++ is the concept of templates.
Templates in C++ are essential for generic programming, serving as blueprints for creating generic classes or functions. In simple terms, templates enable developers to design a single function or class that can work with various data types.
C++ templates, often called generic functions or classes, are a powerful feature of the language. The keyword "template" defines the syntax, while the angled brackets containing a parameter (e.g., T) specify the data type variable.
There are two main types of templates in C++:
• Function templates
• Class templates

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is private public protected in c++?

1097


How do you compile the source code with your compiler?

1106


What are the types of container classes?

1235


What is an adaptor class in c++?

1291


Difference between delete and free.

1137


To what does “event-driven” refer?

1114


Does c++ have string data type?

1165


What is data structure in c++?

1196


What is the need of a destructor?

1205


What do you mean by volatile and mutable keywords used in c++?

1043


Why is c++ so fast?

1088


How do you traverse a btree in backward in-order?

1097


Explain what is polymorphism in c++?

1182


What are the two shift operators and what are their functions?

1142


Write about the members that a derived class can add?

1028