SlideShare une entreprise Scribd logo
1  sur  15
**A PRESENTATION **
** ON **
** DATA STRUCTURES**
**Submitted By:
**Vinay Saurabh
**17BTCSE34
Contents
 Introduction
 Classification
 Operations on Data Structures
 Algorithms and Strategies of Data
Structures
1. Primitive Data Structures
2. Non-Primitive Data Structures
3. Arrays
4. Files
5. Lists
6. Stacks
7. Queues
8. Trees
9. Graphs
2
Introduction
Data
 It is an entity, piece of information that is a fact.
Information
 Instruction + Data
Data Structure
 It is a way of organizing data that considers not only the items stored but
also the relationship of each data.
3
Classification
4
Operations on Data Structures
 Searching- Finding the location of data within the data structure which satisfy the searching
condition or the criteria.
 Sorting- Arranging the data in some logical order in numerically increasing or decreasing
order or alphabetically.
 Insertion- Adding a new data item in the data structure whether at the beginning, end or at
some given location.
 Deletion- Removing a data item from the data structure whether from the beginning, end or
from a location specified.
 Merging- Combining the data of two different sorted files into a single sorted file.
 Traversing- Accessing each data exactly once in the data structure so that each data item
is visited at least once.
5
Algorithm And Strategies
Criteria
 Input: Zero or more quantities that are
externally supplied
 Output: At least one quantity is produced
 Definiteness: Clear and unambiguous
 Finiteness: Terminate after a finite number of
steps
 Effectiveness: Instruction is basic enough to
be carried out
Types of Algorithm Strategies
 Greedy
 Divide and Conquer
 Dynamic Programming
 Exhaustive Search
6
An algorithm is a finite set of instructions that accomplishes a particular task.
Primitive Data Structures
 The primitive data structures are known as basic data structures. These
data structures are directly operated upon by the machine instructions. Normally, primitive
data structures have different representation on different computers.
 These are of Four types: -
1. Integers- They are signed or unsigned whole numbers with the specified range such as 5, 39, -1917, 0 etc.
They have no fractional parts. They are either +ve or –ve .
2. Float- It can hold a real number or a number having a fractional part like 3.112 or 588.001 etc. The
decimal point signals that it is a floating point number, not an integer. The number 15 is an integer but 15.0 is a
floating point number.
3. Character- It can store any member of the basic character set. If a character from this set is stored in a
character variable, its value is equivalent to the integer code of that character basically known as ASCII code. It
can hold one letter/symbol like a, B, d etc. Characters can also be of different types.
4. Pointer- It is but a variable-like name points or represents a storage location in memory ( RAM ).
7
Arrays
 An array is a homogeneous collection of data items stored at contiguous memory locations.
 One Dimensional Array
Single sub-scripted variables are known as
a one-dimensional array or linear array
 Two Dimensional Array
Two sub-scripted variables are
referred as a two-dimensional array.
8
Files
 Files contain data or information, stored permanently in the secondary storage device such as Hard Disk and
Floppy Disk.
 It is useful when we have to store and process a large amount of data.
 A file stored in a storage device is always identified using a file name like HELLO.DAT or TEXTNAME.TXT and
so on.
 A file name normally contains a primary and a secondary name which is separated by a dot(.).
9
Lists
 A list is a collection of a variable number of data items.
 Lists fall in the non-primitive type of data structure in the classification of data structure.
 Every element on a list contains at least two fields, one is used to store data and the other one is used for
storing the address of next element.
 Linear Linked list
10
Stacks
 Like arrays, a stack is also defined as an ordered collection of elements.
 The stack is also known as Last In First Out (LIFO) type of data structure because we can delete and insert
elements from only one end, referred as TOP of the stack.
 Insertion in a stack is called Push and
 Deletion of elements from the stack is known as Pop.
 We can implement a stack using 2 ways:
1. Static implementation (using arrays)
2. Dynamic implementation (using pointers)
11
Queues
 Queues are also non-primitive linear data structure.
 But unlike stacks, queues are the First In First Out (FIFO) type of data structures.
 We can insert an element in a queue from the REAR end
 But we have to remove an element from the FRONT end only.
 We can also implement queues using 2 ways :
1. Using arrays
2. Using pointers
12
Trees
 Tree contain a finite set of data items referred as nodes. We can represent a hierarchical relationship between
the data elements using trees.
A Tree has the following characteristics :
 The top item in a hierarchy of a tree is referred
as the root of the tree.
 The remaining data elements are partitioned into
a number of mutually exclusive subsets and they itself
form a tree and are known as the subtree.
 Unlike natural trees, trees in the data structure
always grow in length towards the bottom.
13
Sub Tree
Graphs
 Graph falls in the non-primitive non-linear type of data structure in the classification of data structure.
 Graphs are capable of representing different types of physical structures.
 Apart from computer science, they are used widely in the fields of Geography, Chemistry & Engineering
Sciences.
 A graph is usually a combination of the set of vertices V and set of edges E.
 The different types of Graphs are :
1. Directed Graph 4. Non-connected Graph
2. Non-directed Graph 5. Simple Graph
3. Connected Graph 6. Multi Graph
14
Data Structure using c language for beginners

Contenu connexe

Tendances (17)

Data Structure # vpmp polytechnic
Data Structure # vpmp polytechnicData Structure # vpmp polytechnic
Data Structure # vpmp polytechnic
 
Data struters
Data strutersData struters
Data struters
 
Introduction to stack
Introduction to stack Introduction to stack
Introduction to stack
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisation
 
Data structure (basics)
Data structure (basics)Data structure (basics)
Data structure (basics)
 
Data structure and its types.
Data structure and its types.Data structure and its types.
Data structure and its types.
 
Lecture1 data structure(introduction)
Lecture1 data structure(introduction)Lecture1 data structure(introduction)
Lecture1 data structure(introduction)
 
Data structures
Data structuresData structures
Data structures
 
Over view of data structures
Over view of data structuresOver view of data structures
Over view of data structures
 
Chapter 1( intro & overview)
Chapter 1( intro & overview)Chapter 1( intro & overview)
Chapter 1( intro & overview)
 
Introduction To Data Structures.
Introduction To Data Structures.Introduction To Data Structures.
Introduction To Data Structures.
 
Data structures Lecture no.3
Data structures Lecture no.3Data structures Lecture no.3
Data structures Lecture no.3
 
Data structures Lecture no. 2
Data structures Lecture no. 2Data structures Lecture no. 2
Data structures Lecture no. 2
 
Database
DatabaseDatabase
Database
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Data structures lectures no 1
Data structures lectures no 1Data structures lectures no 1
Data structures lectures no 1
 
Data and File Structure Lecture Notes
Data and File Structure Lecture NotesData and File Structure Lecture Notes
Data and File Structure Lecture Notes
 

Similaire à Data Structure using c language for beginners

Classification of datastructure.ppt
Classification of datastructure.pptClassification of datastructure.ppt
Classification of datastructure.pptLakshmiSamivel
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdfSulabhPawaia
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxssuser031f35
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
17. DS, Stacks Types of DS.pdf
17. DS, Stacks Types of DS.pdf17. DS, Stacks Types of DS.pdf
17. DS, Stacks Types of DS.pdfRrCreations5
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxsarala9
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxDCABCA
 
Unit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxUnit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxajajkhan16
 
Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Tutort Academy
 
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEVenugopalavarma Raja
 
Bit by bit into data structures
Bit by bit into data structuresBit by bit into data structures
Bit by bit into data structuresHridyesh Bisht
 
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.pptDATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.pptyarotos643
 
Data Structure
Data Structure Data Structure
Data Structure Ibrahim MH
 
data structure details of types and .ppt
data structure details of types and .pptdata structure details of types and .ppt
data structure details of types and .pptpoonamsngr
 
data structure programing language in c.ppt
data structure programing language in c.pptdata structure programing language in c.ppt
data structure programing language in c.pptLavkushGupta12
 

Similaire à Data Structure using c language for beginners (20)

Classification of datastructure.ppt
Classification of datastructure.pptClassification of datastructure.ppt
Classification of datastructure.ppt
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
17. DS, Stacks Types of DS.pdf
17. DS, Stacks Types of DS.pdf17. DS, Stacks Types of DS.pdf
17. DS, Stacks Types of DS.pdf
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
DSA - Copy.pptx
DSA - Copy.pptxDSA - Copy.pptx
DSA - Copy.pptx
 
Unit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptxUnit-1 DataStructure Intro.pptx
Unit-1 DataStructure Intro.pptx
 
Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...Which data structure is it? What are the various data structure kinds and wha...
Which data structure is it? What are the various data structure kinds and wha...
 
1597380885789.ppt
1597380885789.ppt1597380885789.ppt
1597380885789.ppt
 
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
 
Bit by bit into data structures
Bit by bit into data structuresBit by bit into data structures
Bit by bit into data structures
 
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.pptDATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
 
Data Structure
Data Structure Data Structure
Data Structure
 
DS_PPT.ppt
DS_PPT.pptDS_PPT.ppt
DS_PPT.ppt
 
intr_ds.ppt
intr_ds.pptintr_ds.ppt
intr_ds.ppt
 
UNITIII LDS.pdf
UNITIII LDS.pdfUNITIII LDS.pdf
UNITIII LDS.pdf
 
data structure details of types and .ppt
data structure details of types and .pptdata structure details of types and .ppt
data structure details of types and .ppt
 
data structure programing language in c.ppt
data structure programing language in c.pptdata structure programing language in c.ppt
data structure programing language in c.ppt
 

Dernier

PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Dernier (20)

PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Data Structure using c language for beginners

  • 1. **A PRESENTATION ** ** ON ** ** DATA STRUCTURES** **Submitted By: **Vinay Saurabh **17BTCSE34
  • 2. Contents  Introduction  Classification  Operations on Data Structures  Algorithms and Strategies of Data Structures 1. Primitive Data Structures 2. Non-Primitive Data Structures 3. Arrays 4. Files 5. Lists 6. Stacks 7. Queues 8. Trees 9. Graphs 2
  • 3. Introduction Data  It is an entity, piece of information that is a fact. Information  Instruction + Data Data Structure  It is a way of organizing data that considers not only the items stored but also the relationship of each data. 3
  • 5. Operations on Data Structures  Searching- Finding the location of data within the data structure which satisfy the searching condition or the criteria.  Sorting- Arranging the data in some logical order in numerically increasing or decreasing order or alphabetically.  Insertion- Adding a new data item in the data structure whether at the beginning, end or at some given location.  Deletion- Removing a data item from the data structure whether from the beginning, end or from a location specified.  Merging- Combining the data of two different sorted files into a single sorted file.  Traversing- Accessing each data exactly once in the data structure so that each data item is visited at least once. 5
  • 6. Algorithm And Strategies Criteria  Input: Zero or more quantities that are externally supplied  Output: At least one quantity is produced  Definiteness: Clear and unambiguous  Finiteness: Terminate after a finite number of steps  Effectiveness: Instruction is basic enough to be carried out Types of Algorithm Strategies  Greedy  Divide and Conquer  Dynamic Programming  Exhaustive Search 6 An algorithm is a finite set of instructions that accomplishes a particular task.
  • 7. Primitive Data Structures  The primitive data structures are known as basic data structures. These data structures are directly operated upon by the machine instructions. Normally, primitive data structures have different representation on different computers.  These are of Four types: - 1. Integers- They are signed or unsigned whole numbers with the specified range such as 5, 39, -1917, 0 etc. They have no fractional parts. They are either +ve or –ve . 2. Float- It can hold a real number or a number having a fractional part like 3.112 or 588.001 etc. The decimal point signals that it is a floating point number, not an integer. The number 15 is an integer but 15.0 is a floating point number. 3. Character- It can store any member of the basic character set. If a character from this set is stored in a character variable, its value is equivalent to the integer code of that character basically known as ASCII code. It can hold one letter/symbol like a, B, d etc. Characters can also be of different types. 4. Pointer- It is but a variable-like name points or represents a storage location in memory ( RAM ). 7
  • 8. Arrays  An array is a homogeneous collection of data items stored at contiguous memory locations.  One Dimensional Array Single sub-scripted variables are known as a one-dimensional array or linear array  Two Dimensional Array Two sub-scripted variables are referred as a two-dimensional array. 8
  • 9. Files  Files contain data or information, stored permanently in the secondary storage device such as Hard Disk and Floppy Disk.  It is useful when we have to store and process a large amount of data.  A file stored in a storage device is always identified using a file name like HELLO.DAT or TEXTNAME.TXT and so on.  A file name normally contains a primary and a secondary name which is separated by a dot(.). 9
  • 10. Lists  A list is a collection of a variable number of data items.  Lists fall in the non-primitive type of data structure in the classification of data structure.  Every element on a list contains at least two fields, one is used to store data and the other one is used for storing the address of next element.  Linear Linked list 10
  • 11. Stacks  Like arrays, a stack is also defined as an ordered collection of elements.  The stack is also known as Last In First Out (LIFO) type of data structure because we can delete and insert elements from only one end, referred as TOP of the stack.  Insertion in a stack is called Push and  Deletion of elements from the stack is known as Pop.  We can implement a stack using 2 ways: 1. Static implementation (using arrays) 2. Dynamic implementation (using pointers) 11
  • 12. Queues  Queues are also non-primitive linear data structure.  But unlike stacks, queues are the First In First Out (FIFO) type of data structures.  We can insert an element in a queue from the REAR end  But we have to remove an element from the FRONT end only.  We can also implement queues using 2 ways : 1. Using arrays 2. Using pointers 12
  • 13. Trees  Tree contain a finite set of data items referred as nodes. We can represent a hierarchical relationship between the data elements using trees. A Tree has the following characteristics :  The top item in a hierarchy of a tree is referred as the root of the tree.  The remaining data elements are partitioned into a number of mutually exclusive subsets and they itself form a tree and are known as the subtree.  Unlike natural trees, trees in the data structure always grow in length towards the bottom. 13 Sub Tree
  • 14. Graphs  Graph falls in the non-primitive non-linear type of data structure in the classification of data structure.  Graphs are capable of representing different types of physical structures.  Apart from computer science, they are used widely in the fields of Geography, Chemistry & Engineering Sciences.  A graph is usually a combination of the set of vertices V and set of edges E.  The different types of Graphs are : 1. Directed Graph 4. Non-connected Graph 2. Non-directed Graph 5. Simple Graph 3. Connected Graph 6. Multi Graph 14