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

Differentiate between an external iterator and an internal iterator?

985


What do you mean by inheritance in c++? Explain its types.

1122


What is the use of map in c++?

1135


What is endianness?

1080


Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.

3845


Explain the difference between realloc() and free() in c++?

1002


Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

1089


Explain abstraction.

1097


Write a function to find the nth item from the end of a linked list in a single pass.

969


What is #include cmath?

1081


Why do we use classes in programming?

1025


What is a dynamic binding in c++?

944


What is runtime polymorphism in c++?

1147


What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number

1253


How can I learn c++ easily?

1061