Filters
Question type

Study Flashcards

It is a good idea to make a copy constructor's parameters by specifying the _ _ keyword in the parameter list.


A) static, static
B) constant, const
C) global, glob
D) inline, inline
E) None of the above

Correct Answer

verifed

verified

If a function f is a friend of a class A, and the class A is a friend of a class B, then the function f is able to access private members of B.

Correct Answer

verifed

verified

An operator can work with programmer- defined data types.


A) overloaded
B) unconditional
C) undefined
D) inline
E) None of the above

Correct Answer

verifed

verified

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


A) static member functions.
B) instance member variables.
C) static member variables.
D) All of the above
E) None of the above

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

In an inheritance situation, you can't pass arguments to a base class constructor.

Correct Answer

verifed

verified

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


A) operate on no operands.
B) outperform its C language counterparts.
C) be used with types defined by the programmer.
D) operate on more operands than in its standard definition.
E) None of the above

Correct Answer

verifed

verified

When you derive a class from an existing class, you


A) must add both new data and new functions.
B) can add new data, but cannot add new functions.
C) can add both new data and new functions.
D) can add new functions, but cannot add new data.
E) None of the above

Correct Answer

verifed

verified

A constructor that takes a single parameter of a type other than its class is called a convert constructor.

Correct Answer

verifed

verified

C++ permits you to overload the sizeof operator.

Correct Answer

verifed

verified

A derived class may become a base class, if another class is derived from it.

Correct Answer

verifed

verified

The structure member selector operator . cannot be overloaded.

Correct Answer

verifed

verified

A static member function cannot be called if no objects of the class exist.

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

To overload the + operator, you would write a function called


A) overload +.
B) operator.overload(+) .
C) function +.
D) operator +.
E) None of the above

Correct Answer

verifed

verified

The class constructor is called before the class constructor.


A) public, private
B) base, derived
C) private, public
D) derived, base
E) None of the above

Correct Answer

verifed

verified

A member function of a derived class may not have the same name as a member function of a base class.

Correct Answer

verifed

verified

Protected members of a base class are like _ , with the exception that they may be accessed by derived classes.


A) static members
B) constructor functions
C) public members
D) private members
E) None of the above

Correct Answer

verifed

verified

If a member variable is declared _ , all objects of that class share access to that variable.


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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

Showing 21 - 40 of 64

Related Exams

Show Answer