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 is c++ different from java?
What does h mean in maths?
How do you declare A pointer to function which receives an int pointer and returns a float pointer
What is command line arguments in C++? What are its uses? Where we have to use this?
Describe the syntax of single inheritance in C++?
Can you sort a set c++?
Can a class be static in c++?
What is the use of object in c++?
How would you use the functions memcpy(), memset(), memmove()?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
What is expression parser in c++
Why null pointer is used?
What is virtual destructor ans explain its use?
what is a reference variable in C++?
Describe linkages and types of linkages?