C++ Language INTERVIEW QUESTION & ANSWERS
26. |
Define Encapsulation? |
|
The wrapping up of data and functions into a single unit is known as data
encapsulation. Encapsulation means combining data and related functions that use that data together and providing it as a logical entity. |
27. |
What are access specifiers? |
|
Access specifiers determine the accessibility of a class member. In general, there are three important access specifiers : - Public
- Private
- Protected
|
28. |
What is inheritance? |
|
The mechanism of deriving a new class (derived) from an old class (base class) is called inheritance. It allows the extension and reuse of existing code without having to rewrite the code from scratch. Inheritance is the process by which objects of one class acquire properties of objects of another class. |
29. |
What is polymorphism? |
|
Polymorphism means one name, multiple forms. It allows us to have more than one function with the same name in a program.It allows us to have overloading of operators so that an operation can exhibit different behaviours in different instances. |
30. |
What is abstraction? |
|
Abstraction means hiding internal implementation details. |