Search Header Logo

OODP CT2-Quiz

Authored by Thilagavathy R

Computers

University

Used 4+ times

OODP CT2-Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

 In case of inheritance where both base and derived class are having constructors, when an object of derived class is created then___________ .

constructor of derived class will be invoked first

constructor of base class will be invoked first

constructor of derived class will be executed first followed by base class

constructor of base class will be executed first followed by derived class

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If base class has constructor with arguments, then it is ________________ for the derived class to have constructor and pass the arguments to base class constructor.

Optional

Mandatory

Compiler dependent

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In case of inheritance where both base and derived class are having constructor and destructor, then which if the following are true ?

1. Constructors are executed in their order of derivation

2. Constructors are executed in reverse order of derivation

3. Destructors are executed in their order of derivation

4. Destructors are executed in reverse order of derivation

Only 2 ,4

Only 1 , 3

Only 1 , 4

Only 2, 3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If same message is passed to objects of several different classes and all of those can respond in a different way, what is this feature called?

Inheritance

Overloading

Polymorphism

Overriding

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A virtual function is a member function of which of the following class?

Derived class

Parent Class

Base Class

Both Parent and Derived Class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The virtual function is used to tell the compiler to perform ______________

Dynamic Binding

Static Binding

Late Binding

Both Dynamic and Late Binding

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Early binding can be implemented by which of the following?

Virtual Function

Pure Virtual Function

Function Overloading

Function Overriding

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?