Exam 13: Overloading and Templates
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
Which of the following function prototypes overloads the != operator for the class rectangleType?
(Multiple Choice)
4.8/5
(44)
Every object of a class maintains a (hidden) pointer to itself, and the name of this pointer is ____.
(Multiple Choice)
4.9/5
(33)
Which of the following is the general syntax of the function prototype to overload the pre-increment operator as a nonmember function?
(Multiple Choice)
4.8/5
(38)
The general syntax to overload the stream extraction operator >> for a class is ____.
(Multiple Choice)
4.9/5
(43)
In C++, >> is used as a stream extraction operator and as a right shift operator.
(True/False)
4.8/5
(40)
Which of the following is the general syntax of the function prototype to overload the post-increment operator as a member function?
(Multiple Choice)
4.8/5
(32)
Operators can be overloaded either for objects of the user-defined types, or for a combination of objects of the user-defined type and objects of the built-in type.
(True/False)
4.9/5
(34)
Which of the following is the syntax to declare the operator function operator[] as a member function of a class for constant arrays?
(Multiple Choice)
4.9/5
(34)
The operators that cannot be overloaded are ., .*, ::, ?:, and ____________________.
(Short Answer)
4.9/5
(31)
Suppose cType is a class template, which can take int as a parameter. The statement: ____ declares x to be an object of type cType, and the type passed to the class cType is int.
(Multiple Choice)
4.8/5
(35)
A class template is called a(n) ____________________ type because it specifies how a generic class template is to be customized to form a specific template class.
(Short Answer)
4.8/5
(43)
The ____________________ members of a class are local to the class and, therefore, cannot be accessed outside of the class.
(Short Answer)
4.9/5
(37)
To overload the pre-increment (++) operator for a class, if the operator function is a member of that class, it must have ____ parameter(s).
(Multiple Choice)
4.9/5
(29)
A(n) ____ function is a nonmember function that has access to all members of the class.
(Multiple Choice)
4.8/5
(46)
Most operator functions can either be member functions or nonmember functions of a class.
(True/False)
4.9/5
(36)
The ____________________ operator function as a member of a class has only one parameter; as a nonmember of a class, it has two parameters.
(Short Answer)
4.8/5
(43)
With the exception of the ____________________ operator and the member selection operator, operators must be overloaded to be used on class objects.
(Short Answer)
4.8/5
(47)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)