C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.10)


Which of the following concepts of OOPS means exposing only necessary information to client?

[A]. Encapsulation
[B]. Abstraction
[C]. Data hiding
[D]. Data binding

Answer: Option C


No answer description available for this question.

Abc said: (Jul 4, 2012)  
Abstraction is the concept where only important features are shown so that user only use that information he/she should not worried about internal working.

Anu said: (Jul 9, 2012)  
What is the difference between abstraction and data hiding ?

Vishnu said: (Jul 31, 2012)  
Data Encapsulation : It is the process of binding of the data and functions together as a single unit.
Data Abstraction : It is the process of exposing only the interfaces and hiding the other details from the user.

Avin said: (Jul 31, 2012)  
Abstraction is the concept used for showing only essential information while encapsulation (i.e. data hiding) is a concept used for hiding the irrelevant information from the user.

These two concepts work together in any application.

E.g. In an ATM machine, the whole process is hidden from us (Encapsulation) while only read info is given to us like our balance etc. (Abstraction)

Def said: (Sep 2, 2012)  
As we are showing only essential information to the client why it can't be abstraction. A/q to the definition it should be. Please clear b/w abstraction and data hidding.

Vivek Kumar said: (Sep 18, 2012)  
According to me answer should be abstraction because it hides the complexity from the user and provides the required information to the user.

Anya said: (Oct 3, 2012)  
What is the difference between DATA ABSTRACTION and DATA HIDING?

Sushil said: (Oct 10, 2012)  
Abstraction & Encapsulation are vice versa concept.

Varshni said: (Oct 12, 2012)  
Abstraction refers to hiding the complexity i.e. Hiding the steps used to perform operation.

But data hiding refers to hiding certain data from the user.

So data hiding will be the correct answer.

Sanjay said: (Oct 19, 2012)  
Data hiding is part of data abstraction.

Vishwanath said: (Nov 26, 2012)  
Abstraction which denotes/shows the essential characteristics of an object which distinguish it from all other kinds of objects.

Ex. Consider a person details.

Doctor needs || Interviewer needs
>name of patient || >name of candidate
>age of patient || >Qualification of candidate
>height || >Result
>Blood pressure || >Skills etc.

Both of above doctor and interviewer needs the information of person but with different aspect.

Chaitanya said: (Nov 29, 2012)  
Data hiding is also called encapsulation is correct/not?

Sonali said: (Jan 2, 2013)  
Data hiding is the intense version of encapsulation.

Aakriti said: (Feb 8, 2013)  
According to me abstraction is the correct answer because"data hiding" refers to only hiding of data but doesn't say anything about displaying only necessary info.

Abstraction means exposing only the necessary data hiding the background information.

Pavan said: (Apr 8, 2013)  
No @Chaitanya saying that would be incorrect.

Encapsulation refers to binding data and functions working on it in a single component But data hiding is different from it.

Pooja said: (Jul 12, 2013)  
Abstraction - Showing essential features without including background details.

Data hiding - Controlling the accessibility of data like using access specifiers.

So the answer should be ABSTRACTION not data hiding.

Anshu said: (Jul 16, 2013)  
If you consider the broad meaning, data hiding may seem right. But to be very precise, DATA ABSTRACTION should be the correct answer.

Sarang said: (Jul 31, 2013)  
It hides the data and expose only some information which is declared in the person class but we can access it by public variable.

Shruti said: (Aug 4, 2013)  
The answer is abstraction as it hides the complexities from the user and shows only the essential features. Whereas data hiding is hiding the data altogether from the user.

Jwala said: (Aug 11, 2013)  
The answer is abstraction as it hides the complexities from the user and shows only the essential features. Whereas data hiding is hiding the data altogether from the user means data hiding means public, protective or private. Hence data hiding is correct answer.

Sangita said: (Sep 9, 2013)  
Please explain the difference between data hiding and and abstraction with a simple program?

Esraa Salem said: (Jan 7, 2014)  
What is data binding ?

Raju Singh Kumai said: (Jan 22, 2014)  
The answer should be Abstraction as it allow to show only relevant info. And not the detail part.

Rajaram said: (Mar 22, 2014)  
In real world scenario, the data should not be exposed to all/any users such bank details. So info/data should be hidden from others.

Shalu Gupta said: (Mar 26, 2014)  
In my opinion abstraction is right answer. Because abstraction shows only essential feature. And its also hide the complexity. Without including background detail.

And in the question asking exposing only necessary information. Nd in data hiding hiding all the complex processing. And make your work simple. Its not shows essential feature.

Shivani said: (Apr 5, 2014)  
What is difference between data hiding and encapsulation?

King Mj said: (Apr 29, 2014)  
Abstraction is the Right Answer, Data Hiding is purely a part of the Encapsulation.

Vaghasiya Hiren K. said: (May 4, 2014)  
Because the data hiding was one concept of security in OOP.

Than only necessary information to client provided by data hiding.

Metallica said: (May 23, 2014)  
Abstraction is showing the details that are necessary (not hiding anything) , that defines an object as unique separating from anything else. Ex - car has a steering, 4 wheels etc.

Encapsulation is binding data and methods into one functioning unit.

Data hiding is simply hiding data to be accessed by outside world, achieved by private and protected modifiers.

Dinesh Kumar Lodhi said: (Jun 16, 2014)  
Abstraction focuses on the essential characteristics of some object, relative to the perspective of the viewer whereas Encapsulation hides the details of the implementation of an object.

Pankaj said: (Jul 16, 2014)  
How the answer is data hiding?

Ansuman Kar said: (Jul 23, 2014)  
The answer would be Abstraction not data hiding, because in abstraction only we show the user the necessary datas.

Further, if there is difference between abstraction and data hiding, hence provide me a suitable difference between the two.

Aravind said: (Aug 30, 2014)  
Write a simple single program to diff b/w data hiding and abstraction?

Hina said: (Oct 12, 2014)  
According to me abstraction is the correct answer because abstraction focuses on the main aspect of the application and hide the internal details so that it will be more flexible for the user to use.

K2U2007 said: (Oct 16, 2014)  
Declaring data members with access specifier private is known as data hiding. When a program creates a GradeBook object, data member courseName is encapsulated (hidden).

In the object and can be accessed only by member functions of the object's class. In class GradeBook, member functions setCourseName and getCourseName manipulate the data Member courseName directly.

Gautam Dev said: (Oct 31, 2014)  
Encapsulation means protecting data from other programmers in real programming world which can be achieved by the making data variable as private data. The private data variable can only be accessed inside the declared class if we want to allow to access the value to other programmers we provide the another way that is better and setter method for that private variable.

So by better and setter method we allow the another programmer to access the variable we doing this as Abstraction and When we declare the private methods which means we are doing encapsulation.

Roopesh said: (Nov 14, 2014)  
Encapsulation: The wrapping up of data and functions into a single unit is called encapsulation.

Abstraction: Abstraction refer to the act of representing the essential features without including the background details.

Data hiding: The data is not accessible to any other function except the function which is binding to that data.

So the answer is B (ABSTRACTION) not c.

Vipin P Mishra said: (Nov 17, 2014)  
From my thinking abstraction is right answer because abstraction show only show essential information.

Suchita said: (Dec 18, 2014)  
Abstraction is process of identifying key aspects of an entity and ignoring the rest. So answer should be abstraction.

Uday said: (Jan 7, 2015)  
Data hiding means giving/revoking access members. Like access specifiers.

Eg: Public/private/protected. :).

Richa said: (Oct 7, 2015)  
Correct answer is abstraction not data hiding.

Vijuuuuu said: (Dec 21, 2015)  
God knows how ATM counts cash. It is example of?

A) Encapsulation.

B) Abstraction.

C) Data hiding.

D) Data binding.

Vedanti said: (Jun 27, 2016)  
Abstraction is showing only required data to users. The data not to be shown is hidden by default.

While data hiding is specifying the type of access to data. Which may not affect users operation or user may not require. But we can decide the access and if access is given we can see the data which is not the case with abstraction.

Logesh Kumar said: (Jul 1, 2016)  
What is the difference data hiding and data binding?

Priya said: (Jul 15, 2016)  
Data hiding: showing important information by hiding the other details.

Data binding: combining two variables, it is of two types: static and dynamic.

Ejaz Ahmad said: (Sep 29, 2016)  
Abstraction: It is thought process, designing process, it is the process of peacetime while.
Encapsulation: It is coding process, it is implementation of abstraction.

Kalyani said: (Oct 12, 2016)  
Abstraction is right answer. Because it only gives necessary information rather than details.

Sam said: (Oct 27, 2016)  
In c++ program public part is abstraction means showing only essential things.

Private part is data hiding means hiding implementation details means fields.

And abstraction + data hiding = encapsulation.

Through getter and setter method you can access private part data and code binding together.

Anshdeep Chawla said: (Nov 20, 2016)  
The concept of Encapsulation = Concept of DATA HIDING + Concept of ABSTRACTION.

Lukmon said: (Nov 30, 2016)  
I strongly suggest abstraction which involves keeping the main work and showing the interface alone.

Anzee said: (Dec 8, 2016)  
It is abstraction where we only show the important data to the user and hides all remaining.

Sayan Roy said: (Jan 14, 2017)  
The correct Answer should be an abstraction.

Abstraction means to provide necessary details and hides background details. Example- Cout is a predefine object of ostream class. We don't know how to implement done in ostream class but we know that how to use cout object. That is an abstraction.

Khushbu said: (Sep 8, 2017)  
It is wrong abstraction is right as it shows the user only essential information without including background details.

Mayur said: (Sep 12, 2017)  
THe answer should be Abstraction.

Nic said: (Oct 5, 2017)  
Actually, abstraction and encapsulation work together for data hiding.

Chaitanya Bhargav said: (Nov 14, 2017)  
Data hiding means " Hiding the our internal data"..
Data Abstraction means " Hiding the internal implementation".
Encapsulation = Data Hiding + data abstraction.
Encapsulation means " Binding the our internal data and the behavior" .

Rajendra said: (Dec 19, 2017)  
Abstraction is the correct answer.

Neha said: (Mar 23, 2018)  
What is the difference between abstraction and data hiding? and why the answer is data hiding and not an abstraction.

Manisha Kulkarni said: (May 6, 2018)  
I think the answer should be abstraction.

Vishal Singh said: (Jun 17, 2018)  
First thing data hiding is a feature of OOPS Concept and not a pillar of OOPS, the question is clearly asking "Which of the following concepts of OOPS means " So, according to me, that data hiding can't be the correct answer.

Ankit said: (Jun 23, 2018)  

Data abstraction is the right answer.
Data abstraction means showing the essential info to the user.
Whereas data hiding is just way to hide the info from the user.
(how to achieve data hiding -- private, protected, public).

Sudhir said: (Jan 4, 2019)  
Abstraction means nothing but hiding data inside the class showing only essential feature and hiding the rest of calculation done behind.

Sparsh said: (May 29, 2019)  
This should be Abstraction:

Definition of abstraction: In object-oriented programming, abstraction is one of three central principles (along with encapsulation and inheritance). Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency.

Cipachu said: (Jun 11, 2019)  
Abstraction is answer because data hiding is just a term.

Maya Sharma said: (Apr 8, 2020)  
What is the difference between abstraction and data hiding?

Ajeet Gupta said: (Jul 12, 2021)  
Data hiding:

Data hiding is hiding the details of internal data members of an object. Data hiding is also known as Information hiding.


It can be defined as the separation of unnecessary details or explanations from system requirements so as to reduce the complexities of understanding requirements.


It is a mechanism that puts the data and function together. It is the result of hiding the implementation details of an object from its user. The object hides its data to de accessed by only those functions which are packed in the class of that object.

Dynamic Binding:

Dynamic binding is the process of resolving the function to be associated with the respective functions calls during their runtime rather than compile time.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.