Question 1

Time: 00:00:00
When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass _____ the method in the super class.

Overloads

Overloads

Friendships

Friendships

Inherits

Inherits

Overrides

Overrides

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

Please login to submit your explanation

Question 2

Time: 00:00:00
The mechanism that binds code and data together and keeps them secure from outside world is known as

Abstraction

Abstraction

Encapsulation

Encapsulation

Inheritance

Inheritance

Polymorphism

Polymorphism

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

Please login to submit your explanation

Question 3

Time: 00:00:00
The parameter list in function overloading must differ by?

Number of functions

Number of functions

Function Size

Function Size

Function Name

Function Name

Number of argument

Number of argument

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

Please login to submit your explanation

Question 4

Time: 00:00:00
In how many ways is polymorphism achived in C++?

2

2

3

3

1

1

4

4

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

Please login to submit your explanation

Question 5

Time: 00:00:00
A __________ is a special method used to initialize the instance variable of a class.

Member function

Member function

Destructor

Destructor

Constructor

Constructor

Structure

Structure

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

Please login to submit your explanation

Question 6

Time: 00:00:00
The goal of operator overloading is __________.

To help the user of a class

To help the user of a class

To help the developer of a class

To help the developer of a class

To help define friend function

To help define friend function

None of the above

None of the above

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

Please login to submit your explanation

Question 7

Time: 00:00:00
Global Variables can be accessed?

Anywhere in the code except inside functions. After its declaration.

Anywhere in the code except inside functions. After its declaration.

Anywhere in the code, even inside functions. After its declaration.

Anywhere in the code, even inside functions. After its declaration.

Nowhere in the code

Nowhere in the code

None of the above

None of the above

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

Please login to submit your explanation

Question 8

Time: 00:00:00
If class A inherits from more than one class, ie. A inherits from B1, B2,... is called

Single Inheritance

Single Inheritance

Multilevel Inheritance

Multilevel Inheritance

Multiple Inheritance

Multiple Inheritance

None of the above

None of the above

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

Please login to submit your explanation

Question 9

Time: 00:00:00
________ is the mechanism which allows a class A to inherit properties of a class B.

Data abstraction

Data abstraction

Encapsulation

Encapsulation

Inheritance

Inheritance

Polymorphism

Polymorphism

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

Please login to submit your explanation

Question 10

Time: 00:00:00
Which of the following statements is correct?

First time method of a class is called, the constructor method is called.

First time method of a class is called, the constructor method is called.

Every time method of a class is called, the constructor method is called.

Every time method of a class is called, the constructor method is called.

Every time an instance of a class is created, the constructor method is called.

Every time an instance of a class is created, the constructor method is called.

None of the above

None of the above

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.

Comments