Exam 13: Overloading and Templates
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
When an object invokes a member function, the member function references the pointer ____ of the object.
(Multiple Choice)
4.8/5
(43)
Suppose cType is a class template, and func is a member function of cType. The heading of the function definition of func is: ____.
(Multiple Choice)
4.8/5
(40)
The operators that cannot be overloaded are ., .*, ::, ?:, and ____________________.
(Short Answer)
4.8/5
(41)
When the post-increment operator is overloaded as a nonmember function of the class, the operator function has ____ parameter(s).
(Multiple Choice)
4.8/5
(36)
To include the operator function operator+ as a nonmember function of the class rectangleType, its prototype in the definition of rectangleType is: ____ rectangleType operator+(const rectangleType&, const rectangleType&);
(Multiple Choice)
4.8/5
(32)
The general syntax to overload the stream extraction operator >> for a class is ____.
(Multiple Choice)
4.8/5
(42)
Every object of a class maintains a (hidden) pointer to itself, and the name of this pointer is ____.
(Multiple Choice)
4.8/5
(40)
Which of the following is the general syntax of the function prototype to overload the pre-increment operator ++ as a member function?
(Multiple Choice)
4.7/5
(36)
A(n) ____ function is a nonmember function that has access to all members of the class.
(Multiple Choice)
4.7/5
(40)
The general syntax for the function prototype to overload the assignment operator = for a class is ____.
(Multiple Choice)
4.8/5
(42)
A(n) ____________________ constructor converts its argument to an object of the constructor's class.
(Short Answer)
4.9/5
(50)
The declaration of a friend function cannot be placed within the private part of the class.
(True/False)
4.8/5
(30)
In C++, >> is used as a stream extraction operator and as a right shift operator.
(True/False)
4.9/5
(43)
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.9/5
(42)
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.8/5
(33)
Using a class template, you can write a single code segment for a set of related ____.
(Multiple Choice)
4.8/5
(31)
The only built-in operations on classes are assignment (=) and ____________________.
(Short Answer)
4.7/5
(46)
Showing 21 - 40 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)