The ________ operator is used by C++ to assign one object to another object.
<<
=
==
:=
Providing the ability for a C++ built-in operator to work with user-defined types is called ________.
operator overriding
operator inheritance
operator overloading
operator extension
Overloading the C++ assignment operator should be done when the class contains ________.
raw pointers
complex code
C++ strings
more than 10 attributes
If no overloaded assignment operator is provided by the programmer, C++ will provide default assignment that does _________.
deep copy
nothing
Initialization
memberwise assignment
To overload the insertion operator so that you can insert your Test class objects onto an output stream, you would implement a function with the following prototype:
std::ostream operator<<(std::ostream os, Test &obj);
std::ostream &operator<<(std::ostream &os, const Test &obj);
std::ostream &Test::operator<<(std::ostream &os);
std::ostream &Test::operator<<(std::ostream &os) const;
When overloading a C++ operator, which of the following statements is true?
The ‘arity’ of the operator cannot change.
Non C++ operators cannot be overloaded.
Certain C++ operators cannot be overloaded.
The assignment operator must be overloaded as a member function.
All of the above are true.
Most C++ operators can be overloaded as ________ or ________.
friend functions or friend classes
static functions, global functions
member functions, non-member functions
public methods, private methods
If we overload the C++ relational operators such as ==, !=, <, >, <=, >= we should return the ________ type from the function.
int
bool
double
short
Often overload operators implemented as non-member functions are declared as ________ functions.
friend
static
private
nested
What is the correct prototype for the Move Assignment operator for a class named Test?
Test &Test::operator=(const Test &rhs);
Test &Test::operator=(Test &rhs);
Test &Test::operator=(Test &&rhs);
Test &Test::operator=(const Test &&rhs);