1A. In a class template implementation, every use of the class name as the name
ID: 3696959 • Letter: 1
Question
1A.
In a class template implementation, every use of the class name as the name of the class should be followed by <T>.
Select one:
True
False
2A.
Select one:
a. You cannot pass an array to a function.
b. The swap function does not return anything.
c. the = operator does not work for an array.
d. tmp should be an integer.
3A.
Which of the following are valid template prefixes?
Select one:
a. template <class T>
b. template <class Me>
c. template <class T, class Me>
d. All of these
e. None of these
4A.
All classes should be converted to templates.
Select one:
True
False
5A.
A class template may not use dynamic memory allocation.
Select one:
True
False
Explanation / Answer
1 True
2 The SWAP function does not return anything.
3 All of these
4 False as any class can be converted to template but all should not be converted.
5 False as dynamic memory allocation is possible in class templates.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.