Ch 14 Quiz

Ace your homework & exams now with Quizwiz!

True/False: It is possible to declare an entire class as a friend of another class.

True

True/False: The this pointer is a special built-in pointer that is automatically passed as a hidden argument to all non-static member functions.

True

It is a good idea to make a copy constructor's parameters ________ by specifying the ________ key word in the parameter list.

constant, const

When objects contain pointers, it is a good idea to create an explicit ________ function.

copy constructor

A member function that is declared ________ may not access any non-static data members in the class.

static

If a member variable is declared ________, all objects of that class have access to that variable.

static

This type of member variable may be accessed before any objects of the class have been created.

static

This operator may be used to assign one object to another.

=

True/False: A public data member may be declared a friend of a private function.

False

True/False: If you overload the prefix ++ operator, the postfix ++ operator is automatically overloaded.

False

True/False: In C++, if you overload the < operator, you must also overload the > operator.

False

True/False: When a class declares an entire class as its friend, the friendship status is reciprocal. That is, each class's member functions have free access to the other's private members.

False

True/False: You can overload the conditional operator to make it function as an unconditional operator.

False

True/False: You may overload any C++ operator, and you may use the operator function to define non-standard operators, such as @ and ^.

False

In the following function header: FeetInches FeetInches::operator++(int) the word (int) is known as a(n):

dummy operator

A(n) ________ informs the compiler that a class will be declared later in the program.

forward declaration

When you overload an operator, you cannot change the number of ________ taken by the operator.

operands

To overload the + operator, you would write a function named ________.

operator +

An ________ operator can work with programmer-defined data types.

overloaded

If you do not furnish one of these, an automatic memberwise copy will be performed when one object is assigned to another object.

overloaded assignment operator

C++ requires that a copy constructor's parameter be a(n) ________.

reference object

A reason to overload the ________ is to write classes that have array-like behaviors.

square brackets [ ] operator

C++ allows you to redefine the way ________ work when used with class objects.

standard operators

This is a special built-in pointer that is available to a class's member functions.

this pointer

A good reason for overloading an operator is to enable it to ________.

work in its usual way, but with programmer-defined data types


Related study sets

Chapter 5; Porifera and Placozoa

View Set

Human Motivation: Chapter 11: Nature of Emotion - Five Perennial Questions

View Set

CH. 3 - Business Idea Generation and Initial Evaluation

View Set

Accounting 302 Chapter 15: Leases

View Set

Chapter 4 The Tissue Level of Organization

View Set

Targeted Medical Surgical Cardiovascular Online Practice 2019

View Set