Exam 14: More About Classes

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

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

Free
(Multiple Choice)
4.8/5
(91)
Correct Answer:
Verified

C

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

Free
(True/False)
4.8/5
(62)
Correct Answer:
Verified

False

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

Free
(True/False)
4.9/5
(84)
Correct Answer:
Verified

True

A non-static member function may not access a static member variable.

(True/False)
4.7/5
(83)

A good reason for overloading an operator is to enable it to:

(Multiple Choice)
4.9/5
(72)

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

(Multiple Choice)
4.8/5
(68)

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

(True/False)
4.9/5
(80)

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

(Multiple Choice)
4.8/5
(73)

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

(Multiple Choice)
4.7/5
(87)

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

(Multiple Choice)
4.8/5
(64)

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

(Multiple Choice)
4.8/5
(66)

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

(Multiple Choice)
4.8/5
(85)

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

(True/False)
4.9/5
(82)

If you overload the prefix ++ operator, the postfix ++ operator is automatically overloaded.

(True/False)
4.8/5
(85)

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

(Multiple Choice)
4.7/5
(71)

By default, when an object is assigned to another, each member of one object is copied to its counterpart in the other object.

(True/False)
4.9/5
(79)

C++ permits you to overload the sizeof operator and the this pointer.

(True/False)
4.8/5
(77)

Object composition is useful for creating this type of relationship between classes.

(Multiple Choice)
4.9/5
(91)

A(n) ________ operator can work with programmer-defined data types.

(Multiple Choice)
4.8/5
(72)

A static member function does not need to be called by a specific object of the class.

(True/False)
4.7/5
(79)
Showing 1 - 20 of 40
close modal

Filters

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