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
Can I learn c++ without c?
How can you create a virtual copy constructor?
How many keywords are used in c++?
What is wrapper class in c++?
What is the difference between an array and a list?
Describe private, protected and public – the differences and give examples.
What is a string example?
What is class and structure in c++?
Define stacks. Provide an example where they are useful.
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
Define 'std'.
How do you find out if a linked-list has an end?
How do I get good at c++ programming?
Explain the term memory alignment?
Explain the benefits of proper inheritance.