Exam 14: More About Classes

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

This type of function is not a member of a class, but it has access to the private members of the class.

(Multiple Choice)
4.7/5
(40)

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

(Multiple Choice)
4.7/5
(33)

When you overload the << operator, you must also overload the >> operator.

(True/False)
4.8/5
(43)

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.

(True/False)
4.9/5
(38)

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

(Multiple Choice)
4.8/5
(33)

Each object of a class has its own copy of the class's ________.

(Multiple Choice)
4.9/5
(42)

A public data member may be declared a friend of a private function.

(True/False)
4.8/5
(38)

A static member variable can be used when there are no objects of the class in existence.

(True/False)
4.8/5
(35)

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

(Multiple Choice)
5.0/5
(38)

In C++, if you overload the < operator, you must also overload the > operator.

(True/False)
4.9/5
(43)

It is possible to declare an entire class as a friend of another class.

(True/False)
5.0/5
(44)

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

(Multiple Choice)
4.8/5
(38)

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

(Multiple Choice)
4.8/5
(38)

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

(True/False)
4.9/5
(27)

When a class contains an instance of another class, it is known as ________.

(Multiple Choice)
4.9/5
(36)

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

(Multiple Choice)
4.9/5
(33)

You can overload the conditional operator to make it function as an unconditional operator.

(True/False)
4.8/5
(42)

When you overload an operator, you can change the operator's original meaning to something entirely different.

(True/False)
4.7/5
(33)

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

(Multiple Choice)
4.9/5
(35)

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

(Multiple Choice)
4.7/5
(37)
Showing 21 - 40 of 40
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)