Exam 15: Polymorphism and Virtual Functions

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

To indicate that a member function of a class is pure virtual,

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

C

In C++, polymorphism is very difficult to achieve unless you also use inheritance.

Free
(True/False)
4.7/5
(38)
Correct Answer:
Verified

True

When a virtual member function of a class in a class hierarchy is invoked through a pointer to an object in the class hierarchy, the compiler will select the member function to be invoked

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

A

A class with at least one pure virtual function is called

(Multiple Choice)
4.7/5
(39)

functions are dynamically bound by the compiler.

(Multiple Choice)
4.8/5
(37)

Declaring a member function of a class to be a _ will cause the C++ compiler to use dynamic binding.

(Multiple Choice)
4.9/5
(29)

An abstract class is

(Multiple Choice)
4.8/5
(34)

to a base class may be assigned the address of a derived class object.

(Multiple Choice)
4.9/5
(37)

Polymorphism is when in a class hierarchy perform differently, depending upon the class of the object making the call.

(Multiple Choice)
4.8/5
(43)

A pure virtual function

(Multiple Choice)
4.8/5
(42)

Static binding occurs when the compiler binds a function call at compile time.

(True/False)
4.9/5
(38)

A pure virtual function

(Multiple Choice)
4.7/5
(35)

A virtual function is declared by placing the keyword in front of the return type in the base class's function declaration.

(Multiple Choice)
4.9/5
(51)

Pointers to a base class may be assigned the address of a derived class object.

(True/False)
4.8/5
(33)

Polymorphism in C++ will not work unless .

(Multiple Choice)
4.9/5
(33)

The term means the ability to take many forms.

(Multiple Choice)
4.9/5
(36)

When more than one class is derived from a base class, the situation is called

(Multiple Choice)
4.9/5
(42)

An abstract class is somewhat restricted in how it can be used because

(Multiple Choice)
4.9/5
(33)

When the compiler binds a call to a member function using only information available at compile time, the compiler is said to use binding.

(Multiple Choice)
4.8/5
(32)

In C++, polymorphism is based on the ability to make member functions of a class

(Multiple Choice)
4.9/5
(34)
close modal

Filters

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