Chapter 13 Flashcards
True or false:
In C++,»_space; is used as a stream extraction operator and as a right shift operator.
True
True or false:
Operator functions typically return void.
False
True or false:
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
True or false:
In C++, operator is a reserved word.
True
True or false:
A friend function does not have access to the private data members of the class.
False
True or false:
The declaration of a friend function cannot be placed within the private part of the class.
False
True or false:
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.
False
True or false:
Most operator functions can either be member functions or nonmember functions of a class.
True
True or false:
Both parameters of the function to overload the operator «_space;are reference parameters.
True
True or false:
The associativity of the operator = is from right to left.
True
The name of the function to overload the operator <= is _________.
operator<=
Every object of a class maintains a (hidden) pointer to itself, and the name of this pointer is _____.
this
When an object invokes a member function, the member function references the pointer ______ of the object.
this
A(n) _________ function is a nonmember function that has access to all members of the class.
friend
The function that overloads the ___ operator for a class must be declared as a member of the class.
->
The general form of the functions to overload the binary operators as member functions of a class is returnType operator#(_____ className& ) const;
const