C++ Template Question:

What is Encapsulation in C++?

Tweet Share WhatsApp

Answer:

The wrapping up of data and member function into an object is called encapsulation. The data is not accessible to the outside world and only those functions which are wrapped into the object can access it. An encapsulated objects act as a "black box" for other parts of the program which interact with it. They provide a service, but the calling objects do not need to know the details how the service is accomplished.

Download C++ Template PDF Read All 23 C++ Template Questions
Previous QuestionNext Question
What is Inheritance in C++?What is Polymorphism in C++?