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

What is else if syntax?

1217


Write is a binary search tree? Write an algo and tell complexity?

1074


What is the last index number in an array of 100 characters a) 100 b) 99 c) 101

1229


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

1146


What is the difference between set and map in c++?

1184


Define anonymous class.

1137


What is a v-table?

1232


Explain what are accessor methods?

1171


What are the defining traits of an object-oriented language?

1265


What is the real purpose of class – to export data?

1167


how to connect with oracle 9i with server in socket program in c/c++

2399


Explain terminate() and unexpected() function?

1167


What is the full form of india?

1210


Is java the same as c++?

1037


Define a nested class.

1126