Polymorphism And Abstract Function MCQs

Polymorphism And Abstract Function MCQs

Our team has conducted extensive research to compile a set of Polymorphism And Abstract Function MCQs. We encourage you to test your Polymorphism And Abstract Function knowledge by answering these # multiple-choice questions provided below.
Simply scroll down to begin!

1: A virtual function that has no definition within the base class is called____________.

A.   Pure Const function

B.   Friend function

C.   Pure virtual function

D.   Pure static function

2: Runtime polymorphism is achieved only when a virtual function is accessed through a pointer to the base class.

A.   True

B.   False

3: Syntax for Pure Virtual Function is______________.

A.   Void virtual show()==0

B.   Virtual void show()=0

C.   Void virtual show()=0

D.   Virtual void show()==0

4: Run time polymorphism can be achieved with______.

A.   None

B.   Virtual function

C.   Container class

D.   Virtual Base class

5: While redefining a virtual function in the derived class, if its prototype is changed then___________________.

A.   Its virtual nature will be lost

B.   None

C.   It will be overloaded by the compiler And Its virtual nature will be lost

D.   It will be overloaded by the compiler

6: _______________ is a member function that is declared within a base class and redefined by derived class.

A.   Static function

B.   Friend function

C.   Virtual function

D.   Const member function

7: Find the wrong statement/s about Abstract Class.

A.   We can’t create its objects

B.   It contains at least one pure virtual function

C.   We can’t create pointers to an abstract class

D.   We can create references to an abstract class

8: We can create objects of the abstract class.

A.   True

B.   False

9: When a virtual function is redefined by the derived class, it is called___________.

A.   Rewriting

B.   All

C.   Overriding

D.   Overloading

10: If abstract class is inherited by derived class, then_______________.

A.   Derived class should provide definition for all the pure virtual functions

B.   All

C.   Objects of derived class can’t be created if it fails to implement pure virtual functions

D.   Derived class also become abstract if fails to implement pure virtual functions

11: If a class contains pure virtual function, then it is termed as_____________________

A.   Virtual class

B.   Sealed class

C.   Pure Local class

D.   Abstract class

12: Which of the followings are true about Virtual functions?

A.   Constructor Functions cannot be virtual

B.   They must be non-static member function of the class

C.   All

D.   They cannot be friends