Member Functions Mcqs

Our collections of Multiple choice questions and answers focuses on study of Member Functions in OOP. These questions are chosen from a collection of most authoritative and best reference books on OOP. Our aim is to prepare an individual for competitive exams like NTS, Web Developer | IOS Developer | Game Developer | Software House interviews and jobs, University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate Member Functions in OOP comprehensively.

1.
Virtual function is ______ class function which expected to be redefined in ______ class, so that when reference is made to derived class object using pointer then we can call virtual function to execute ________ class definition version.

Base, derived, derived

Derived, Derived, Derived

Base, derived, base

Base, base, derived

2.
What does a virtual function ensure for an object, among the following?

Correct method is called, regardless of the class defining it

Correct method is called, regardless of the object being called

Correct method is called, regardless of the type of reference used for function call

Correct method is called, regardless of the type of function being called by objects

3.
Virtual functions are mainly used to achieve _____________

Compile time polymorphism

Interpreter polymorphism

Runtime polymorphism

Functions code polymorphism

9.
Which is must condition for virtual function to achieve runtime polymorphism?

Virtual function must be accessed with direct name

Virtual functions must be accessed using base class object

Virtual function must be accessed using pointer or reference

Virtual function must be accessed using derived class object only

10.
Which among the following is true for virtual functions?

Prototype must be different in base and derived class

Prototype must be same in base class and derived class

Prototype must be given only in base class

Prototype must have different signature in base and derived class

11.
The virtual functions must be declared and defined in _____________ class and overridden in ___________ class.

Base, base

Derived, derived

Derived, base

Base, derived

13.
Which among the following best defines the abstract methods?

Functions declared and defined in base class

Functions only declared in base class

Function which may or may not be defined in base class

Function which must be declared in derived class

14.
Which among the following is true ?

The abstract functions must be only declared in derived classes

The abstract functions must not be defined in derived classes

The abstract functions must be defined in base and derived class

The abstract functions must be defined either in base or derived class

15.
How are abstract functions different from the abstract functions?

Abstract must not be defined in base class whereas virtual function can be defined

Either of those must be defined in base class

Different according to definition

Abstract functions are faster

0Shares
0
Scroll to Top