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
Explain static and dynamic memory allocation with an example each.
Can notepad ++ run c++?
Write some differences between an external iterator and an internal iterator?
Is oops and c++ same?
Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.
Differences between private, protected and public and give examples.
Explain the uses oof nested class?
Comment on assignment operator in c++.
Can we delete this pointer in c++?
What is const pointer and const reference?
Explain one method to process an entire string as one unit?
What is exception handling? Does c++ support exception handling?
When should we use multiple inheritance?
What is difference between c++ and c ++ 14?
Can member functions be private?