SlideShare a Scribd company logo
Presented by :
SHUBHAM SINGH
BCA FINAL YEAR
VIVEK COLLEGE OF EDUCATION, BIJNOR
DATA STRUCTURE
A data structure is a mathematical or
logical model of particular
organization of data.
A data structure is a way of
organization of data items , that
consider not only the data elements
stored but also there relationship to
each other.
Types of data structure
Data structure
Primitive data structure
Integer
Float
Char
pointer
Non-primitive data structure
Linear data
structure
Array
Stack
Queue
Linked list
Non linear data
structure
Tree
Graph
Primitive data structure
There are basic structure and
directly operated upon by the
machine .
For eg :- integer , float, pointer,
character .
Primitive data structure
Integer
Float
Character
Pointer
Integer
 The number without any decimal point is known as
integer.
 They are also known as whole number.
 They occupies 2 bytes space in computer memory.
 Example : 12, 15, 45, etc.
 Syntex :
 For example : int a=10;
int variable_name=constant;
char
 The single character is known as integer.
 They Always written in single inverted comma(‘ ‘).
 They occupies 1 byte space in computer memory.
 Example : ‘a’, ‘b’, ‘A’, etc.
 Syntex :
 For example: char alpha=‘A’;
char variable_name=‘ character’ ;
float
 The number with any decimal point is known as float
number.
 They are with the decimal( . ).
 They occupies 4 bytes space in computer memory.
 Example : 12.5, 15.78, 45.547, etc.
 Syntex :
 For example: float a=25.1;
float variable_name = floating constant ;
Pointer
 Pointer is the variable that can hold the address of any
variable.
 It is point on the that variable which address it can
hold itself.
 It is declare using the astrict(*) sign.
 Syntex :
 For example: int *a;
DATATYPE *VARIABLENAME;
Non- primitive data structure
These are derived from primitive
data structure . It is divided into
two parts:-
1) Linear data structure
2) Non-linear data structure
Linear data structure
 In this type of data structure all the
elements are stored in a particular sequence.
 It is also called sequential data structure.
 Linear data structure are of four types :-
1) Array
2) Stack
3) Queue
4) Link list
ARRAY
 An array is the collection of similar data type or as a set
of finite homogenous element or data item.
 It means an array contains one type of data only either
integer or floating number or character.
Syntex:
 Example: int a[5]; char name[20];
Data type array_name[size];
STACK
 A stack is a linear data structure.
 A stack is also called ordered collection of element
like array.
 It works on the concept of “LAST IN FIRST
OUT”(LIFO) with two operations can be perform
i.e. insertion and deletion.
 Inserting of element into stack is called PUSH .
 Deletion of element from stack is called POP.
10(T)
20(T)
10
30(T)
20
10
40(T)
30
20
10
50(T)
40
30
20
10
50(T)
40
30
20
10
40(T)
30
20
10
30(T)
20
10
20(T)
10 10(T)
INSERTION OR PUSH
DELETION OR POP
Empty stack
Empty stack
QUEUE
• A queue is a linear list of element in which
deletion can take place only at the one end called
FRONT, and insertion can take place only at the
other end called REAR.
• It works on the “FIRST IN FIRST OUT”(FIFO).
• Since the first element in a queue will be the first
element out of the queue.
• In other word the order in which element enter a
queue in the same order which they need.
FRONT REAR
10
F
20 30 40
R
10
F
20 30
R
10
F
20
R
10
F, R
40
F, R
30
F
40
R
20
F
30 40
R
10
F
20 30 40
R
INSERTION DELETION
LINKED LIST
 A linked list or a one way list is a linear collection of
data element called nodes.
 Each node is divided into two parts, the first part
contain the information of the element and the second
part called the linked fields or next pointer field
contain the next node in the list.
INFO NEXT
NODE
EXAMPLE:
BBA 2
BCA 9
MCA X
5
NO. INFO NEXT
1
2 BCA 9
3
4
5 BBA 2
6
7
8
9 MCA
NON LINEAR DATASTRUCTURE
 In this type of data structure all the elements are
not stored in a particular sequence.
 In non linear data structure we have two types-
1) Tree
2) Graph
TREE
• Tree is a non primitive and non linear data structure in
which items are arranged in a sorted sequence.
• This data structure is used to represent a hierarchical
relationship adjusting among several data items.
• A tree is a finite set of data element or nodes such that
there is a special item known as ‘root’ of the tree.
• A graphical representation of tree is given as-
A
ED
B C
ROOT
GRAPH
 A graph may be represented as a collection of vertices
and edges.
 Mathematically we can define a graph G as a collection
of two sets which are referred as the vertex set and the
edge set.
Where V(G) is a finite end non empty set of vertices
and E(G) represent the finite set of edges.
G=V(G) U E(G)
e1
e5
e4
e3
e2
A B
D C

More Related Content

ODP
Datatype in JavaScript
PPTX
Binary search tree deletion
PPTX
Introduction to JavaScript
PPTX
Step by step how to create database with phpmyadmin
PDF
Variables & Data Types In Python | Edureka
PPTX
For Loops and Nesting in Python
PPT
MYSQL Aggregate Functions
PDF
Javascript
Datatype in JavaScript
Binary search tree deletion
Introduction to JavaScript
Step by step how to create database with phpmyadmin
Variables & Data Types In Python | Edureka
For Loops and Nesting in Python
MYSQL Aggregate Functions
Javascript

What's hot (20)

PPT
Css advanced – session 4
PDF
Polymorphism In Java
PDF
Programming in Java: Library Classes
PDF
UNIT II LINEAR DATA STRUCTURES – STACKS, QUEUES
PPTX
Inheritance in c++theory
ODP
Introduction to Web Scraping using Python and Beautiful Soup
PPTX
Values and Data types in python
PPTX
Type casting in java
PPTX
Dynamic method dispatch
PPTX
Advanced JavaScript
PDF
binary decrementer.pdf
PPTX
Creating a Binary tree from a General Tree.pptx
PPTX
SOAP--Simple Object Access Protocol
PPTX
Constructor overloading & method overloading
PDF
javascript objects
PPTX
PPTX
Operators in C
PPTX
C# Strings
PPTX
Data structure using c module 1
Css advanced – session 4
Polymorphism In Java
Programming in Java: Library Classes
UNIT II LINEAR DATA STRUCTURES – STACKS, QUEUES
Inheritance in c++theory
Introduction to Web Scraping using Python and Beautiful Soup
Values and Data types in python
Type casting in java
Dynamic method dispatch
Advanced JavaScript
binary decrementer.pdf
Creating a Binary tree from a General Tree.pptx
SOAP--Simple Object Access Protocol
Constructor overloading & method overloading
javascript objects
Operators in C
C# Strings
Data structure using c module 1
Ad

Similar to DATA STRUCTURE IN C LANGUAGE (20)

PDF
2. Introduction to Data Structure.pdf
PDF
Data structures introduction
PPT
data structure programing language in c.ppt
PPT
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
PPT
data structure details of types and .ppt
PPT
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
PPT
DS_PPT.ppt
PPT
Lecture 1 - Overview of Data Structure .ppt
PPT
1597380885789.ppt
PDF
.DATA STRUCTURES
PPTX
Data structures
PPT
PMDATA STRUICVIUDGHfjufguigfuigkguidfui.ppt
PPT
different types of data structures using c.ppt
PPT
DSA theory all topics (summary) presentation
PPT
Basic Data Structure and its concepts details
PPT
DATA STRUCTURES IN INFORMATION TECHNOLOGY
PPT
Data Structures and Algorithm for Engineers.ppt
PPT
02-dataStructurePM and algortima for python.ppt
PPTX
DS2-CLASSIFICATIONnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn.pptx
2. Introduction to Data Structure.pdf
Data structures introduction
data structure programing language in c.ppt
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
data structure details of types and .ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DS_PPT.ppt
Lecture 1 - Overview of Data Structure .ppt
1597380885789.ppt
.DATA STRUCTURES
Data structures
PMDATA STRUICVIUDGHfjufguigfuigkguidfui.ppt
different types of data structures using c.ppt
DSA theory all topics (summary) presentation
Basic Data Structure and its concepts details
DATA STRUCTURES IN INFORMATION TECHNOLOGY
Data Structures and Algorithm for Engineers.ppt
02-dataStructurePM and algortima for python.ppt
DS2-CLASSIFICATIONnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn.pptx
Ad

Recently uploaded (20)

PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
System and Network Administraation Chapter 3
PPTX
Transform Your Business with a Software ERP System
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
top salesforce developer skills in 2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
ai tools demonstartion for schools and inter college
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
How to Choose the Right IT Partner for Your Business in Malaysia
System and Network Administraation Chapter 3
Transform Your Business with a Software ERP System
Digital Systems & Binary Numbers (comprehensive )
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PTS Company Brochure 2025 (1).pdf.......
Design an Analysis of Algorithms I-SECS-1021-03
top salesforce developer skills in 2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
2025 Textile ERP Trends: SAP, Odoo & Oracle
Internet Downloader Manager (IDM) Crack 6.42 Build 41
How to Migrate SBCGlobal Email to Yahoo Easily
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
ai tools demonstartion for schools and inter college
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Design an Analysis of Algorithms II-SECS-1021-03
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design

DATA STRUCTURE IN C LANGUAGE

  • 1. Presented by : SHUBHAM SINGH BCA FINAL YEAR VIVEK COLLEGE OF EDUCATION, BIJNOR
  • 2. DATA STRUCTURE A data structure is a mathematical or logical model of particular organization of data. A data structure is a way of organization of data items , that consider not only the data elements stored but also there relationship to each other.
  • 3. Types of data structure Data structure Primitive data structure Integer Float Char pointer Non-primitive data structure Linear data structure Array Stack Queue Linked list Non linear data structure Tree Graph
  • 4. Primitive data structure There are basic structure and directly operated upon by the machine . For eg :- integer , float, pointer, character .
  • 6. Integer  The number without any decimal point is known as integer.  They are also known as whole number.  They occupies 2 bytes space in computer memory.  Example : 12, 15, 45, etc.  Syntex :  For example : int a=10; int variable_name=constant;
  • 7. char  The single character is known as integer.  They Always written in single inverted comma(‘ ‘).  They occupies 1 byte space in computer memory.  Example : ‘a’, ‘b’, ‘A’, etc.  Syntex :  For example: char alpha=‘A’; char variable_name=‘ character’ ;
  • 8. float  The number with any decimal point is known as float number.  They are with the decimal( . ).  They occupies 4 bytes space in computer memory.  Example : 12.5, 15.78, 45.547, etc.  Syntex :  For example: float a=25.1; float variable_name = floating constant ;
  • 9. Pointer  Pointer is the variable that can hold the address of any variable.  It is point on the that variable which address it can hold itself.  It is declare using the astrict(*) sign.  Syntex :  For example: int *a; DATATYPE *VARIABLENAME;
  • 10. Non- primitive data structure These are derived from primitive data structure . It is divided into two parts:- 1) Linear data structure 2) Non-linear data structure
  • 11. Linear data structure  In this type of data structure all the elements are stored in a particular sequence.  It is also called sequential data structure.  Linear data structure are of four types :- 1) Array 2) Stack 3) Queue 4) Link list
  • 12. ARRAY  An array is the collection of similar data type or as a set of finite homogenous element or data item.  It means an array contains one type of data only either integer or floating number or character. Syntex:  Example: int a[5]; char name[20]; Data type array_name[size];
  • 13. STACK  A stack is a linear data structure.  A stack is also called ordered collection of element like array.  It works on the concept of “LAST IN FIRST OUT”(LIFO) with two operations can be perform i.e. insertion and deletion.  Inserting of element into stack is called PUSH .  Deletion of element from stack is called POP.
  • 15. QUEUE • A queue is a linear list of element in which deletion can take place only at the one end called FRONT, and insertion can take place only at the other end called REAR. • It works on the “FIRST IN FIRST OUT”(FIFO). • Since the first element in a queue will be the first element out of the queue. • In other word the order in which element enter a queue in the same order which they need.
  • 16. FRONT REAR 10 F 20 30 40 R 10 F 20 30 R 10 F 20 R 10 F, R 40 F, R 30 F 40 R 20 F 30 40 R 10 F 20 30 40 R INSERTION DELETION
  • 17. LINKED LIST  A linked list or a one way list is a linear collection of data element called nodes.  Each node is divided into two parts, the first part contain the information of the element and the second part called the linked fields or next pointer field contain the next node in the list. INFO NEXT NODE
  • 18. EXAMPLE: BBA 2 BCA 9 MCA X 5 NO. INFO NEXT 1 2 BCA 9 3 4 5 BBA 2 6 7 8 9 MCA
  • 19. NON LINEAR DATASTRUCTURE  In this type of data structure all the elements are not stored in a particular sequence.  In non linear data structure we have two types- 1) Tree 2) Graph
  • 20. TREE • Tree is a non primitive and non linear data structure in which items are arranged in a sorted sequence. • This data structure is used to represent a hierarchical relationship adjusting among several data items. • A tree is a finite set of data element or nodes such that there is a special item known as ‘root’ of the tree. • A graphical representation of tree is given as-
  • 22. GRAPH  A graph may be represented as a collection of vertices and edges.  Mathematically we can define a graph G as a collection of two sets which are referred as the vertex set and the edge set. Where V(G) is a finite end non empty set of vertices and E(G) represent the finite set of edges. G=V(G) U E(G)