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++ a programming language?

1011


Does c++ have arraylist?

959


What does obj stand for?

1084


What is stl containers in c++?

987


What problems might the following macro bring to the application?

980


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

1092


What is a volatile variable in c++?

1356


Why Pointers are not used in C++?

1010


What is low level language in simple words?

973


What is data binding in c++?

902


What does scope resolution operator do?

1049


Give example of a pure virtual function in c++?

1082


If a header file is included twice by mistake in the program, will it give any error?

992


What is different in C++, compare with unix?

1017


Do you know what are static and dynamic type checking?

1010