what is data Abstraction? and give example
Answer Posted / chealsha
Data abstraction is a process of representing essential
features without showing the background details.
For example:
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
int a,b;
cout<<"enter a";
cin>>a;
b=sqrt(a);
cout<<"square of a="<<b;
getch();
}
In the above example,we are doing the square of "a" where
we can only see/use the sqrt function but we cant see the
background deails like coding of sqrt().
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How do I write a c++ program?
How to demonstrate the use of a variable?
What are advantages of c++?
What is the use of "new" operator?
Explain virtual destructor?
Which one is a preferred language C or C++? Why?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
Can I learn c++ without knowing c?
How the virtual functions maintain the call up?
Which operator cannot be overloaded c++?
How can we access protected and private members of a class?
What is the difference between method overloading and method overriding in c++?
Do you know about latest advancements in C++ ?
Difference between a homogeneous and a heterogeneous container
Is it possible to have a recursive inline function in c++?