Please only answer if you kow your answer is correct. Negtive reviews will be gi
ID: 3696952 • Letter: P
Question
Please only answer if you kow your answer is correct. Negtive reviews will be given for wrong answers.
1.If you define a function template, then the compiler will create a separate function definition for every data type that exists.
Select one:
True
False
2.
When would you want to make a function a function template?
Select one:
a. when the implementation details of the function are independent of the data type(s) of the parameters
b. All functions should be function templates.
c. when two different functions have different implementation details
d. only when two functions have the same type of parameters
3.
Which of the following is a correct template prefix?
Select one:
a. template <class T>
b. template <Class >
c. <template> class T
d. All of these
4.
In a template function definition, all parameters must be of the template class (T).
Select one:
True
False
5.
You may not have overloaded friend operators in a class template.
Select one:
True
False
Explanation / Answer
1. False
2. a. when the implementation details of the function are independent of the data type(s) of the parameters
3. a. template <class T>
4. True
5. True
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.