C++ Programming :: Inheritance

NA
SHSTTON
6
Solv. Corr.
6
Solv. In. Corr.
12
Attempted
0 M:0 S
Avg. Time

1 / 20

Choose the correct option.

A single sub object is inherited regardless how many times the base class occurs within the class derivation, in


Avirtual inheritance

Bmultiple inheritance

Cpublic inheritance

Dnone of these

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
5
Solv. Corr.
10
Solv. In. Corr.
15
Attempted
0 M:0 S
Avg. Time

2 / 20

Choose the correct option.

A pointer to a base class type can be refer to an object of a derived class type, this is called


Ainheritance

Bmemory addressing

Cpolymorphism

Dencapsulation

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
15
Solv. Corr.
2
Solv. In. Corr.
17
Attempted
0 M:0 S
Avg. Time

3 / 20

Choose the correct option.

The programming language feature that allows the same operation to be carried out differently depending on the object is


Apolymorphism

Binheritance

Callocation

Dmangling

 View Answer |  Discuss in Forum |  Workspace | Asked In Sopra Steria |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
7
Solv. Corr.
7
Solv. In. Corr.
14
Attempted
0 M:0 S
Avg. Time

4 / 20

Choose the correct option.

Inheritance is the principle that


Aclasses with the same name must be derived from one another

Bknowledge of a genral category can be applied to more specific objects

CC++ functions may be used only if they have logical predecessors

Done function name may invoke different methods

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
6
Solv. Corr.
8
Solv. In. Corr.
14
Attempted
0 M:0 S
Avg. Time

5 / 20

Choose the correct option.

A class's inherited access is overrided to make an individual member's access, more


Aliberal

Bconservative

Ceither (a) or (b)

Dnone of these

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
1
Solv. Corr.
13
Solv. In. Corr.
14
Attempted
0 M:0 S
Avg. Time

6 / 20

Choose the correct option.

Compared with the classes from which they are derived, inherited classes may have


Aadditional data members

Badditional member functions.

Cboth (a) and (b)

Dnone of these

 View Answer |  Discuss in Forum |  Workspace | Asked In Sopra Steria |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
10
Solv. Corr.
4
Solv. In. Corr.
14
Attempted
0 M:0 S
Avg. Time

7 / 20

Choose the correct option.

What does inheriatance allows you to do?


Acreate a class

Bcreate a hierarchy of classes

Caccess methods

DNone of these

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
14
Solv. Corr.
1
Solv. In. Corr.
15
Attempted
0 M:0 S
Avg. Time

8 / 20

Choose the correct option.

What is the syntax of inheritance of class?


Aclass name

Bclass name : access specifer

Cclass name : access specifer class name

DNone of these

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
7
Solv. Corr.
7
Solv. In. Corr.
14
Attempted
0 M:0 S
Avg. Time

9 / 20

Choose the correct option.

Which symbol is used to create multiple inheritance?


ADot

BComma

CDollar

DNone of these

Answer: Option B

Explanation:

For using multiple inheritance, simply specify each base class (just like in single inheritance), separated by a comma.

Workspace

NA
SHSTTON
6
Solv. Corr.
9
Solv. In. Corr.
15
Attempted
0 M:0 S
Avg. Time

10 / 20

Choose the correct option.

Which of the following advantages we lose by using multiple inheritance?


ADynamic binding

BPolymorphism

CBoth a & b

DNone of these

 View Answer |  Discuss in Forum |  Workspace | Asked In Sopra Steria |

Answer: Option C

Explanation:

The benefit of dynamic binding and polymorphism is that they help making the code easier to extend but by multiple inheritance it makes harder to track.

Workspace