Cplusplus Programming Function Templates 2 Online Exam Quiz
Cplusplus Programming Function Templates 2 GK Quiz. Question and Answers related to Cplusplus Programming Function Templates 2. MCQ (Multiple Choice Questions with answers about Cplusplus Programming Function Templates 2
In how many ways templates concept can be used?
Options
A : 1
B : 2
C : 3
D : 4
What are Templates in C++?
Options
A : A feature that allows the programmer to write generic programs
B : A feature that allows the programmer to write specific codes for a problem
C : A feature that allows the programmer to make program modular
D : A feature that does not add any power to the language
Templates simulate which of the following feature?
Options
A : Polymorphism
B : Abstraction
C : Encapsulation
D : Inheritance
Which keyword is used for the template?
Options
A : Template
B : template
C : Temp
D : temp
What is the correct syntax of defining function template/template functions?
Options
A : template <class T> void(T a){cout<<a;}
B : Template <class T> void(T a){cout<<a;}
C : template <T> void(T a){cout<<a;}
D : Template <T> void(T a){cout<<a;}
What is the difference between normal function and template function?
Options
A : The normal function works with any data types whereas template function works with specific types only
B : Template function works with any data types whereas normal function works with specific types only
C : Unlike a normal function, the template function accepts a single parameter
D : Unlike the template function, the normal function accepts more than one parameters
Chemical Engineering Basics - Part 1 more Online Exam Quiz
Cplusplus Programming Exception Handling 2
Cplusplus Programming File Handling
Cplusplus Programming Friend Function
Cplusplus Programming Function Objects
Cplusplus Programming Functions
Cplusplus Programming Functors
Cplusplus Programming Generators
Cplusplus Programming Inheritance 1