MCQs
A template is a formula for creating a generic class
Every string template is used to replace the string with another string at runtime.
There are two types of templates. They are function template and class template.
In this program, We are passing the value to the template and printing it in the template.
template < >
same as template
The compiler can determine at compile time whether the type associated with a template definition can perform all of the functions required by that template definition.
The following are legal for non-type template parameters: integral or enumeration type, Pointer to object or pointer to function, Reference to object or reference to function, Pointer to member.
During runtime, We can choose the appropriate type for the function
and it is called as template type parameters.
creating a function without having to specify the exact type.