Exam 13: Operator 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 Classes44 Questions
Exam 13: Operator Overloading and Templates41 Questions
Exam 14: Exception Handling43 Questions
Exam 15: Recursion43 Questions
Exam 16: Linked Lists40 Questions
Exam 17: Stacks and Queue43 Questions
Exam 18: Searching and Sorting Algorithms40 Questions
Exam 19: Binary Trees43 Questions
Exam 20: Graph Algorithms48 Questions
Exam 21: Standard Template Library41 Questions
Select questions type
The name of the function to overload the operator <= is ____.
(Multiple Choice)
4.8/5
(30)
When the post-increment operator is overloaded as a nonmember function of the class, the operator function has ____ parameter(s).
(Multiple Choice)
4.9/5
(32)
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.9/5
(38)
Using a class template, you can write a single code segment for a set of related ____.
(Multiple Choice)
4.8/5
(32)
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
(30)
A friend function does not have access to the private data members of the class.
(True/False)
4.7/5
(42)
Any function that overloads an operator is called a(n) ____________________ function.
(Short Answer)
4.8/5
(38)
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.7/5
(32)
The return type of the function to overload the operator >> must be a reference to a(n) ____ object.
(Multiple Choice)
4.9/5
(40)
The general syntax to overload the stream extraction operator >> for a class is ____.
(Multiple Choice)
4.9/5
(26)
The operators that cannot be overloaded are ., .*, ::, ?:, and ____________________.
(Short Answer)
4.9/5
(31)
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.9/5
(38)
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
(35)
Which of the following function prototypes overloads the != operator for the class rectangleType?
(Multiple Choice)
4.9/5
(40)
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
(35)
Both parameters of the function to overload the operator << are reference parameters.
(True/False)
4.8/5
(45)
Showing 21 - 40 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)