Question 1

Time: 00:00:00
Which type of inheritance is shown in the figure?

Ques 1 quiz 1 Opps concept hackerrank

Single Level

Single Level

Multi Level

Multi Level

Multiple Level

Multiple Level

Hierarchical Level

Hierarchical Level

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

Please login to submit your explanation

Question 2

Time: 00:00:00
Having more than 1 function with the same function name and the same number of parameters is known as

Compile Time Polymorphism

Compile Time Polymorphism

Runtime Polymorphism

Runtime Polymorphism

Function Overloading

Function Overloading

Function Repeating

Function Repeating

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

Please login to submit your explanation

Question 3

Time: 00:00:00
Which of the following operators cannot be overloaded?

+

+

_

_

.

.

*

*

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

Please login to submit your explanation

Question 4

Time: 00:00:00
What is the output of the following code?

10

10

20

20

Compile Time Error

Compile Time Error

Run Time Error

Run Time Error

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

Please login to submit your explanation

Question 5

Time: 00:00:00
How to access the private members of a class?

Using private access specifier

Using private access specifier

Using public access specifier

Using public access specifier

Using friend class

Using friend class

Using protected access specifier

Using protected access specifier

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

Please login to submit your explanation

Question 6

Time: 00:00:00
Reusing the same code in different classes is known as _____?

Abstraction

Abstraction

Data Hiding

Data Hiding

Inheritance

Inheritance

Polymorphism

Polymorphism

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

Please login to submit your explanation

Question 7

Time: 00:00:00
The data members and functions of a class in C++ are by default ____________

protected

protected

private

private

public

public

public & protected

public & protected

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

Please login to submit your explanation

Question 8

Time: 00:00:00
Can we create the objects of the derived class?

True

True

False

False

Depends

Depends

Neither True Nor False

Neither True Nor False

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

Please login to submit your explanation

Question 9

Time: 00:00:00
The abstract class should have

One virtual function

One virtual function

One pure virtual function

One pure virtual function

One member function

One member function

One member function

One member function

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

Please login to submit your explanation

Question 10

Time: 00:00:00
What is the output of the following code?

Ques 20.

Ques 20 Quiz-1 hackerrank

B

B

A

A

Compile Time Error

Compile Time Error

Runtime Error

Runtime Error

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!","Keep trying!","Not bad!","Good work!","Perfect!"]

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.

Comments

One comment on “HackerRank OOPS Quiz -1”