Technical Discussion :: C++
Home > Freshers > Technical Interview Questions > C++
14. What is encapsulation?
Answer:
Encapsulation is binding of attributes and behaviors. Hiding the actual implementation and exposing the functionality of any object. Encapsulation is the first step towards OOPS, is the procedure of covering up of data and functions into a single unit (called class). Its main aim is to protect the data from out side world.
Asked In :: Wipro Tech Mahindra TCS iGate Accenture Paytm
Packaging an object’s variables within its methods is called encapsulation.
Encapsulation is binding of attributes and behaviors. Hiding the actual implementation and exposing the functionality of any object. Encapsulation is the first step towards OOPS, is the procedure of covering up of data and functions into a single unit (called class). Its main aim is to protect the data from out side world.