Programming - C++ Language
You Are Here :: Home > C++ Language > Oops - General Questions
19. |
If class A inherits from class B, then B is called _______ of A. A is called ________ of B.
|
A. |
Super class, Sub class |
B.
|
Subclass, Super class |
C.
|
Abstract class, Base Class
|
D.
|
Child class, Sub Class
|
|
Answer: Option A
Explanation:
|
20. |
If class A inherits from more than one class, ie. A inherits from B1, B2,... is called
|
A. |
Single Inheritance |
B.
|
Multilevel Inheritance |
C.
|
Multiple Inheritance
|
D.
|
None of the above
|
|
Answer: Option C
Explanation:
|
21. |
In how many ways is polymorphism achived in C++?
|
|
Answer: Option B
Explanation:
|
22. |
The mechanism that binds code and data together and keeps them secure from outside world is known as
|
A. |
Abstraction |
B.
|
Encapsulation |
C.
|
Inheritance
|
D.
|
Polymorphism
|
|
Answer: Option B
Explanation:
|
23. |
The process of building new classes from existing one is called ______.
|
A. |
Polymorphism |
B.
|
Structure |
C.
|
Inheritance
|
D.
|
Cascading
|
|
Answer: Option C
Explanation:
|
24. |
If a class C is derived from class B, which is derived from class A, all through public inheritance, then a class C member function can access
|
A. |
protected and public data only in C and B. |
B.
|
protected and public data only in C. |
C.
|
private data in A and B.
|
D.
|
protected data in A and B.
|
|
Answer: Option D
Explanation:
|
« prev
next »