- World's Largest Collection of Interview Questions
Interview Success Kit - 9,000 Interview Que. & Ans.
Covers 9,000+ Interview Questions asked in actual MNC Interviews - all with model answers.
Start Your Own website Now
Sponsored Links

Interview Questions
Our Services

Question :
What is encapsulation?
Category Virtual Functions in C++ Interview Questions
Rating (0.3) By 77 users
Added on 10/22/2004
Views 9775
Rate it!

Packaging an object?s variables within its methods is called encapsulation.

It is protective wrapper which prevents the data from being accessed by the code outside the the wrapper, the code inside the wrapper can be accessed by a well defined interface<br><br>ex: class is a protective wrapper which binds data and methods together,they can be accessed only though well defined interface(i.e object of that class)

Posted by: shaker    

Contact shaker Contact shaker

Wrapping of data and member function in a single unit is known as encapsulation.

Posted by: manas    

Contact manas Contact manas

The wrapping of data and function together in a single unit is called encapsulation. It tell how to bind data.this is useful to hide the data which is the new feature added to oops for providing security.

Posted by: jas    

Contact jas Contact jas

The wrapping up of data and its associate function together in a single unit(called class) is known as encapsulation.

Posted by: shalu    

Contact shalu Contact shalu

Encapsulation<br>1. Encapsulation is the mechanism that binds together code and the data it manipulates and keeps both safe from outside interference and misuse.<br>2. Encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.<br>3. It binds the data and codes that operates on the data into a single entity.<br>4. Encapsulation protects an implementation from unintended actions and inadvertent access.<br>5. The encapsulation of instance variables is sometimes called as ?Information Hiding?.<br><br>The technique of hiding the internal implementation detail of an object from it?s external views. Internal structure remains private and services can be accessed by other objects only through messages passed via a clearly defined interface. Encapsulation ensures that the object providing service can prevent other objects from manipulating its data or procedures directly, and it enables the object requesting service to ignore the details of how that service is provided.<br>

Posted by: Sree Ranjini    

Contact Sree Ranjini Contact Sree Ranjini

Wrapping of data members and member functions in a single entity.

Posted by: Bhawna    

Contact Bhawna Contact Bhawna

bringing together data(attributes) and methods (behaviour) within a single entity (class) is known as encapsulation

Posted by: shanthakumar    

Contact shanthakumar Contact shanthakumar

Wraping of data and function into a single unit is called encapsulation. ex object and class

Posted by: susil manohara sahoo    

Contact susil manohara sahoo Contact susil manohara sahoo

Encapsulation is the process of hiding the data of the objects which is not contributed in it's essential characteristics.

Posted by: Sudhandhu Srivastava    

Contact Sudhandhu Srivastava Contact Sudhandhu Srivastava

wrapping up of data and function into a single unit that called as encapsulation.n those data n function can be accesed via instances<br>ex: class

Posted by: jaywant topno    

Contact jaywant topno Contact jaywant topno

It is the ability of object to hide its data n methods from rest of the programe.It is one of the fundamental principles of OOPs.<br>for Ex let we have a class called Multiplication defined below<br>Public class Multiplication<br>{<br> private void Multiply(int x,int y)<br> {<br> return x*y<br> }<br>}<br>...<br>...<br>Multiplication abc;<br>int Result;<br>Result=abc.Multipy(2,5);<br>now Multiplication is a class having fumction Multiply as one of its function and abc is the object of the class and this class is used to access the multiply function n there is no other source to access the function multiply hence no one but only object have the power to access the member function of class hiding it from the out side world.

Posted by: kanika khanna    

Contact kanika khanna Contact kanika khanna

Packaging of data and function into a single componate is known as encapsulation.

Posted by: santosh kumar mallick    

Contact santosh kumar mallick Contact santosh kumar mallick

Encapsulation is the mechanism that binds together code and the data it manipulates,<br>and keeps both safe from outside interference and misuse.

Posted by: Dany    

Contact Dany Contact Dany

encapsulation is feature of oops concept it is nothing but class<br>class:-<br>wrapping up of both the data members and the member functions is called class which is extacted from the concept encapsulation

Posted by: P.ASHWINI    


Encapsulation is the process of wrapping up data and code which accesses it using a keyword "class"(in most programming languages)

Posted by: Harsha H R    

Contact Harsha H R Contact Harsha H R

encapsulation is hiding irrelevant information of an object

Posted by: Pravin Jebadoss    

Contact Pravin Jebadoss Contact Pravin Jebadoss

Encapsulation is the process of Binding data in a single class type variable. This concept is just like binding medicine in single capsul.

Posted by: Bhushan    

Contact Bhushan Contact Bhushan

Encapsulation is used for data hiding. By using encapsulation, operations on datas can be performed through well defined interfaces. This ensures impossibility of inadvertent change of data. For example member values of an object can only be modified through its member methods. In C++, declaring a function friend of a class makes it feasible to access the class data. Java don't have any such concept and seems more objective in this sense.

Posted by: Moheed    

Contact Moheed Contact Moheed

Encapsulation is the mechanism that binds together the code and the data it manipulates and keeps both safe from outside interference and misuse.<br><br>It provides the explicit boundary between an object's abstract interface and it's internal implementation details.

Posted by: Monalisha Nayak    

Contact Monalisha Nayak Contact Monalisha Nayak

Encapsulation is the method of putting all the similar data into a single block.Where this single block is nothing but the class.where it contains the attributes and methods.

Posted by: Sudha reddy    

Contact Sudha reddy Contact Sudha reddy

Wrapping(binding ) of data and member function in a single unit is known as encapsulation.

Posted by: gourav    

Contact gourav Contact gourav

the wrapping up of data and code in a single unit known as class is called encapsulation.<br>

Posted by: Gaurav Agrawal    

Contact Gaurav Agrawal Contact Gaurav Agrawal

incapsulation means to combine data and methods into a single module in which they are combind with each other.

Posted by: shivani    

Contact shivani Contact shivani

Wrapping data and member functions in single unit is called as encapsulation

Posted by: mukund    

Contact mukund Contact mukund

binding of data and member function together in a single unit is called encapsulation<br>ex:class

Posted by: BIPIN KUMAR DAS    


process of binding the member variable of a class along with member functions. It can be implemented with the help of object and also access modifiers like private, public and protected.

Posted by: Srinivasaraju    

Contact Srinivasaraju Contact Srinivasaraju

If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

    Related Questions
    View Answer
    What is virtual class and friend class?
    View Answer
    What do you mean by pure virtual functions?
    View Answer

    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here - Best Freshers & Experienced Jobs Website.

    View ALL Virtual Functions in C++ Interview Questions

    User Options
    Sponsored Links

    Copyright ©2003-2016, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

    Cache = 0 Seconds