×
Start where you are. Use what you have. Do what you can.
--Your friends at LectureNotes

# Note for Data Structure using C - DS By seethal babu

• Data Structure using C - DS
• Note
• 29 Views
• Uploaded 4 months ago
Seethal Babu
0 User(s)

#### Text from page-1

14 MEA Engineering College, Perinthalmanna MODULE II Linear Data Structures (Linked list) Data Data means values or set of values. Data can be defined as representation of facts, concepts or instruction in a formalized manner which should be suitable for communication, interpretation or processing by human or machine. Information It is the organized or classified data . So that it has some meaningful values to the receiver. Information is the processed data on which decision and actions are performed. Eg:Data 16 28/9/1990 Information Age of a person Distance between two places Age of a person Month of birth is September Data Structure In computer science data structure is a particular way of storing and organizing data in a computer, so that it can be use efficiently. Data structure is an arrangement of data in computer memory or even disk storage (secondary memory).A data structure can be considered as a combination of data and a set of algorithms that stores and organize data in computer memory efficiently. Thus data structure=Data +set of algorithms that stores and organize the data Data structure perform the following Department of Computer Science & Engineering

#### Text from page-2

15 MEA Engineering College, Perinthalmanna 1. Storage representation of user data:User data should be stored in a such a way that computer can understand it. 2. Retrieval of stored data The data stored in a computer should be retrieve in such a way that user can understand it. 3. Transformation of user data Various operations which require to be perform on user data, so that it can transform from one form to another A data structure D is a triplet D=(d,f,a) Where d-Domain Domain is the range of values that a data made up. This domain is also term as data object. f- functions This is the set of operations which may be applied to the element of data object aAxioms this is the set of rules with which different operations belongs to f actually can be implemented Classification of Data Structure Data structure can be classified into linear and nonlinear data structure In case of linear data structure all the elements form a sequence and maintain a linear fashion. In case of nonlinear data structure elements are distributed over a plane, ie follow a nonlinear fashion. Arrays It is a collection of data of same data types stored in consecutive memory location that is referred by a common name Department of Computer Science & Engineering

#### Text from page-3

16 MEA Engineering College, Perinthalmanna Linked List It is a collection of data of same data type ,but the data items need not be stored in consecutive memory locations Stack A stack is Last in First Out(LIFO) data structure, here insertion and deletion takes place at one end called stack top. Here insertion is known as PUSH operation and deletion is known as POP operation Queues A queue is a First in First Out (FIFO) in which insertion takes place at real end and deletion takes place at front end. Insertion is known as enqueue operation and deletion is known as dequeue operation. Trees Trees are used to represent data that has some hierarchical relationship among data elements Department of Computer Science & Engineering

#### Text from page-4

17 MEA Engineering College, Perinthalmanna Graphs A graph is used to represent data that has relationship between pair of elements, not necessarily hierarchical All trees are graphs, but all graphs are not trees Tables In table , data is arranged in no.of rows and columns Sets A set is a abstract data type that can store certain values without any particular order and without any repeatation. Data types Data type is a term which refers to kind of data that may appear in computation. A data type is a classification for identifying one of the various type of data such as real numbers, integers, characters, Booleans etc Data types takes the possible values, the operation on that type, the way the value of that types are stored. Built-in Data types Data types which are built in with the programming language is called built-in data type/fundamental data type. Eg:- the fundamental data type in C are int, float, char, double Data type Number of bytes Range of values char 1 byte -27 to 27-1 int 2 byte -215 to 215 -1 Department of Computer Science & Engineering