Filters
Question type

Study Flashcards

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


A) friend
B) static
C) has a
D) conditional
E) None of these

Correct Answer

verifed

verified

C

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

Correct Answer

verifed

verified

False

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

Correct Answer

verifed

verified

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


A) static
B) dynamic
C) inline
D) default
E) None of these

Correct Answer

verifed

verified

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


A) outperform its C language counterparts
B) work in its usual way, but with programmer-defined data types
C) operate on more operands than in its standard definition
D) operate on no operands
E) None of these

Correct Answer

verifed

verified

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


A) parentheses ( ) operator
B) curly braces { } operator
C) square brackets [ ] operator
D) colon : : operator
E) None of these

Correct Answer

verifed

verified

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


A) reassigned
B) reformatted
C) overloaded
D) overwhelmed
E) None of these

Correct Answer

verifed

verified

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


A) overloaded -> operator
B) this pointer
C) &constructor pointer
D) ~destructor *ptr
E) None of these

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

In the following function header: In the following function header:   The word (int) is known as a(n) : A) parameterless data type B) incomplete argument C) dummy parameter D) incomplete parameter E) None of these The word (int) is known as a(n) :


A) parameterless data type
B) incomplete argument
C) dummy parameter
D) incomplete parameter
E) None of these

Correct Answer

verifed

verified

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


A) integer data type
B) floating point data type
C) pointer variable
D) reference object
E) None of these

Correct Answer

verifed

verified

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


A) compiler errors
B) preprocessor directives
C) standard operators
D) undefined variables
E) None of these

Correct Answer

verifed

verified

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


A) destructor
B) static function
C) copy constructor
D) assignment function
E) None of these

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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


A) copy constructor
B) constructor
C) destructor
D) All of these
E) None of these

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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


A) inline, inline
B) static, static
C) constant, const
D) global, global
E) None of these

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

True

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


A) =
B) ==
C) <>
D) @
E) None of these

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

Showing 1 - 20 of 40

Related Exams

Show Answer