Which of the following shows multiple inheritances ?
Answer: Option C
In multiple inheritance, a single class is inherited from two classes. So in A,B->C, Class C is inherited from A and B, whereas in A->B->C, C from B and B from A called simple inheritance, in A->B; A->C, B and C are inherited from A which is called hierarchical inheritance.
How access specifiers in Class helps in Abstraction ?
They does not helps in any way
They allows us to show only required things to outer world
They help in keeping things together
Abstraction concept is not used in classes
Answer: Option B
Abstraction is the concept of hiding things from the outer world and showing only the required things to the world, which is where access specifiers private, protected and public helps in keeping our knowledge hidden from the world.