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
Any function that overloads an operator is called a(n) ____________________ function.
Free
(Short Answer)
4.9/5
(30)
Correct Answer:
operator
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
(36)
If you overload the binary arithmetic operator + as a member function, how many objects must be passed as parameters?
(Multiple Choice)
4.9/5
(39)
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.9/5
(37)
The return type of the function to overload the operator >> must be a reference to a(n) ____ object.
(Multiple Choice)
4.9/5
(42)
The name of the function to overload the operator <= is ____.
(Multiple Choice)
4.7/5
(32)
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.7/5
(32)
The function that overloads the ____ operator for a class must be declared as a member of the class.
(Multiple Choice)
4.9/5
(38)
The ____________________ operator causes a member-wise copy of the member variables of the class.
(Short Answer)
5.0/5
(34)
With the exception of the ____________________ operator and the member selection operator, operators must be overloaded to be used on class objects.
(Short Answer)
4.9/5
(52)
A friend function does not have access to the private data members of the class.
(True/False)
4.8/5
(39)
Which of the following is the syntax to declare the operator function operator[] as a member function of a class for nonconstant arrays?
(Multiple Choice)
4.8/5
(41)
Both parameters of the function to overload the operator << are reference parameters.
(True/False)
4.8/5
(35)
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
(31)
When writing the definition of a friend function, the name of the class and the scope resolution operator precede the name of the friend function in the function heading.
(True/False)
4.8/5
(40)
Which of the following function prototypes overloads the != operator for the class rectangleType?
(Multiple Choice)
4.8/5
(37)
The general form of the functions to overload the binary operators as member functions of a class is returnType operator#(____ className&) const;.
(Multiple Choice)
4.8/5
(37)
Showing 1 - 20 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)