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
What is a .lib file in c++?
What is the use of endl in c++ give an example?
What is the rule of three?
What are the benefits of pointers?
What is object in c++ wikipedia?
How to access a variable of the structure?
What is a type library?
What is difference between n and endl in c++?
Tell me what are static member functions?
Can you declare an array without a size in c++?
What are special characters c++?
What is data types c++?
How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?
Is swift faster than go?
Which one is better- macro or function?