Exam 14: More About Classes

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

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

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

False

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

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

True

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

Free
(Multiple Choice)
4.7/5
(37)
Correct Answer:
Verified

C

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

(True/False)
4.8/5
(43)

The this pointer is automatically passed to non-static member functions of a class.

(True/False)
4.8/5
(39)

When you redefine the way a standard operator works when it is used with class objects, you have ________ the operator.

(Multiple Choice)
4.9/5
(41)

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

(Multiple Choice)
4.9/5
(28)

In the following function header: In the following function header:   The word (int)is known as a(n): The word (int)is known as a(n):

(Multiple Choice)
4.9/5
(31)

If you do not furnish one of these a default will be provided for you by the compiler.

(Multiple Choice)
4.8/5
(44)

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

(Multiple Choice)
4.7/5
(44)

This is a special function that is called whenever a new object is created and initialized with another object's data.

(Multiple Choice)
4.7/5
(30)

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

(Multiple Choice)
5.0/5
(29)

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

(Multiple Choice)
4.9/5
(39)

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

(Multiple Choice)
4.8/5
(38)

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

(True/False)
4.9/5
(36)

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

(True/False)
4.8/5
(32)

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

(True/False)
4.9/5
(33)

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

(Multiple Choice)
4.7/5
(36)

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

(Multiple Choice)
4.9/5
(36)

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

(Multiple Choice)
4.8/5
(36)
Showing 1 - 20 of 40
close modal

Filters

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