Question 1

Time: 00:00:00
Which among the following can show polymorphism?

a) Overloading ||

a) Overloading ||

b) Overloading +=

b) Overloading +=

c) Overloading <<

c) Overloading <<

d) Overloading &&

d) Overloading &&

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
What is output of the following program?
class student
{
public : int marks;
void disp()
{
cout<<”its base class”
};
class topper:public student
{
public :
void disp()
{
cout<<”Its derived class”;
}
}
void main() { student s; topper t;
s.disp();
t.disp();
}

a) Its base classIts derived class

a) Its base classIts derived class

b) Its base class Its derived class

b) Its base class Its derived class

c) Its derived classIts base class

c) Its derived classIts base class

d) Its derived class Its base class

d) Its derived class Its base class

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00
Which among the following can’t be used for polymorphism?

a) Static member functions

a) Static member functions

b) Member functions overloading

b) Member functions overloading

c) Predefined operator overloading

c) Predefined operator overloading

d) Constructor overloading

d) Constructor overloading

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
In case of using abstract class or function overloading, which function is supposed to be called first?

A) Local function

A) Local function

B) Function with highest priority in compiler

B) Function with highest priority in compiler

C) Global function

C) Global function

D) Function with lowest priority because it might have been halted since long time, because of low priority

D) Function with lowest priority because it might have been halted since long time, because of low priority

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
Which type of function among the following shows polymorphism?

a) Inline function

a) Inline function

b) Virtual function

b) Virtual function

c) Undefined functions

c) Undefined functions

d) Class member functions

d) Class member functions

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
Which class/set of classes can illustrate polymorphism in the following code:
abstract class student
{
public : int marks;
calc_grade();
}
class topper:public student
{
public : calc_grade()
{
return 10;
}
};
class average:public student
{
public : calc_grade()
{
return 20;
}
};
class failed{ int marks; };

a) Only class student can show polymorphism

a) Only class student can show polymorphism

b) Only class student and topper together can show polymorphism

b) Only class student and topper together can show polymorphism

c) All class student, topper and average together can show polymorphism

c) All class student, topper and average together can show polymorphism

d) Class failed should also inherit class student for this code to work for polymorphism

d) Class failed should also inherit class student for this code to work for polymorphism

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
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?

a) Inheritance

a) Inheritance

b) Overloading

b) Overloading

c) Polymorphism

c) Polymorphism

d) Overriding

d) Overriding

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
Which among the following is the language which supports classes but not polymorphism?

a) SmallTalk

a) SmallTalk

b) Java

b) Java

c) C++

c) C++

d) Ada

d) Ada

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 9

Time: 00:00:00
What do you call the languages that support classes but not polymorphism?

a) Class based language

a) Class based language

b) Procedure Oriented language

b) Procedure Oriented language

c) Object-based language

c) Object-based language

d) If classes are supported, polymorphism will always be supported

d) If classes are supported, polymorphism will always be supported

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 10

Time: 00:00:00
Which among the following best describes polymorphism?

a) It is the ability for a message/data to be processed in more than one form

a) It is the ability for a message/data to be processed in more than one form

b) It is the ability for a message/data to be processed in only 1 form

b) It is the ability for a message/data to be processed in only 1 form

c) It is the ability for many messages/data to be processed in one way

c) It is the ability for many messages/data to be processed in one way

d) It is the ability for undefined message/data to be processed in at least one way

d) It is the ability for undefined message/data to be processed in at least one way

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice! \r\n","Keep trying! \r\n","Not bad! \r\n","Good work! \r\n","Perfect! \r\n"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.