-->
Search here and hit enter....

Abstract Data Type | Part 10 | IDA using C

  Hello Viewer! how are you? I hope you are very well. Today I have learned about Abstract Data Type. below I have written whatever I learn today ... 

abstract data type


 An Abstract Data Type is the way we look at the data structure. Focusing on "WHAT IS DOES" and ignoring "HOW IT DOES" its job.

  • Example: Stacks and Queues are examples of an ADT.
  • We can implement both these ADTs using Arrays or Linked Lists.

To further understand the meaning of an abstract data type we will break them into "Data Type" and "Abstract"


DataType:-
Data Type of a variable is a set of values that the variable can take. [we have already read the basic data type in C including int, char, float double etc.]


When we talked about a Primitive Data Type(Built-in Data Type) then it means 
  • A data item with certain characteristics and
  • Permissible operation on that data.

For Example:
An "INT" variable can contain any whole number value from -32768 to 32768 that can be operated with the operators +, -, * and /.

In other words, the operations that can be performed on a data type are an inseparable part of its identity.
Therefore when we declare a variable of an ADT (ex Stack, Queue), we also need to specify operations that can be performed on it.

Abstract:-
The word "Abstract" in the context of Data Structures means considered apart from the detailed specifications or Implementations.

In C,
It can be thought of as a description of data in the structure with a list of operations that can be performed on data within that structure.


The End-User is not concerned about the details of how the methods carry out their tasks. they are only aware of the method that is available to them and is only concerned about calling those method and getting these result. [They are not concerned about how they work]

For Example:
When we use Stack / Queue, the user is concerned only with the type of data and the operations that we can perform on it.
They should just know that to work with Stacks, they have PUSH(), POP() etc. functions available to them using this they can insert or delete the Data.


That's All for Today! I hope You like and understand whatever I have written. If you find any error don't forget to mention it in the comment section or mail me. 💗💗

Note:- I learned this from "Data Structure using C" Book written By Reema Thareja.

FB COMMENTS ()