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 / hr@tgksolutions.com

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

Is c++ faster than c?

1007


Why do we use constructor?

1039


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2465


What is malloc in c++?

1004


Difference between inline functions and macros?

1025


Will rust take over c++?

1046


Can static member variables be private?

1161


What is a pointer how and when is it used?

1079


What is the difference between containment and delegation?

1317


What is a friend function in c++?

1596


What is do..while loops structure?

1131


Difference between overloading vs. Overriding

1068


Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

1923


Explain selection sorting?

1061


What does the nocreate and noreplace flag ensure when they are used for opening a file?

1106