Quiz-1

Hello PrepSter,

If you find any errors in the quiz below kindly comment in the comment section and we will make it our priority to fix it.

Also if you have a better of the solution to the questions, please do comment them below and if we find it better than ours, we will post it in our website.

Question 1

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

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

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

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

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

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

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

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

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

Start

Question 2

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

Class based language

Class based language

Procedure Oriented language

Procedure Oriented language

Object-based language

Object-based language

If classes are supported, polymorphism will always be supported

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

Start

Question 3

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

Overloading ||

Overloading ||

Overloading +=

Overloading +=

Overloading <<

Overloading <<

Overloading &&

Overloading &&

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

Please login to submit your explanation

Start

Question 4

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

SmallTalk

SmallTalk

Java

Java

C++

C++

Ada

Ada

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

Please login to submit your explanation

Start

Question 5

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?

Inheritance

Inheritance

Overloading

Overloading

Polymorphism

Polymorphism

Overriding

Overriding

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

Please login to submit your explanation

Start

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; };







Only class student can show polymorphism

Only class student can show polymorphism

Only class student and topper together can show polymorphism

Only class student and topper together can show polymorphism

All class student, topper and average together can show polymorphism

All class student, topper and average together can show polymorphism

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

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

Start

Question 7

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

Inline function

Inline function

Virtual function

Virtual function

Undefined functions

Undefined functions

Class member functions

Class member functions

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

Please login to submit your explanation

Start

Question 8

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

Local function

Local function

Function with highest priority in compiler

Function with highest priority in compiler

Global function

Global function

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

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

Start

Question 9

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

Static member functions

Static member functions

Member functions overloading

Member functions overloading

Predefined operator overloading

Predefined operator overloading

Constructor overloading

Constructor overloading

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

Please login to submit your explanation

Start

Question 10

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();
}







Its base classIts derived class

Its base classIts derived class

Its base class Its derived class

Its base class Its derived class

Its derived classIts base class

Its derived classIts base class

Its derived class Its base class

Its derived class Its base class

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

Please login to submit your explanation

Start

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