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
A(n) ____________________ returns random numbers whose likelihoods correspond to a specific shape such as uniform or normal.
Free
(Short Answer)
4.9/5
(41)
Correct Answer:
distribution
A(n) ____________________ constructor converts its argument to an object of the constructor's class.
Free
(Short Answer)
4.9/5
(41)
Correct Answer:
conversion
The associativity of the operator = is from right to left.
Free
(True/False)
4.9/5
(29)
Correct Answer:
True
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)
5.0/5
(37)
A(n) ____ function is a nonmember function that has access to all members of the class.
(Multiple Choice)
4.9/5
(41)
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.9/5
(28)
In C++, >> is used as a stream extraction operator and as a right shift operator.
(True/False)
4.9/5
(31)
Using a class ____________________ allows you to define an arrayListType that can process any type of list.
(Short Answer)
4.7/5
(35)
The declaration of a friend function cannot be placed within the private part of the class.
(True/False)
4.8/5
(36)
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
(40)
When an object invokes a member function, the member function references the pointer ____ of the object.
(Multiple Choice)
4.8/5
(41)
To overload the pre-increment (++) operator as a member of a class, requires ____ parameter(s).
(Multiple Choice)
4.8/5
(40)
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
(37)
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.8/5
(46)
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
(37)
The function that overloads the ____ operator for a class must be declared as a member of the class.
(Multiple Choice)
4.8/5
(30)
If you overload the binary arithmetic operator + as a member function, how many objects must be passed as parameters?
(Multiple Choice)
4.8/5
(40)
The general syntax for the function prototype to overload the assignment operator = for a class is ____.
(Multiple Choice)
4.8/5
(37)
Every object of a class maintains a (hidden) pointer to itself, and the name of this pointer is ____.
(Multiple Choice)
4.8/5
(34)
Showing 1 - 20 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)