SlideShare a Scribd company logo
Ds chapter 2
INTRODUCTION TO ARRAY
An array is a finite ordered collection of homogeneous(same) data
element which provides random access to the element .
The array element share a common name .
Declaration :- Array
array name
int a[5] size of an array
Datatype
For e.g array of integers a[8]
0 1 2 3 4 5 6 7 8
a 1 2 3 4 5 6 7 8 9
Syntax Of array
int arr[10];
char arr[10];
float arr[5]
 It allows storing collection of information in one organised place .
All elements are stored in continous memory location
The size and type of an array cannot be changed after its compliation , hence
array are called as Static and Structure .
 Applications of Array
1. Array is used to store list of values .
2. Array is used to perform Matrix Operations .
3. Array is used to implement Search Algorithm .
4. Array is used to implement Sorting Algorithm .
5. Array is used to implement Data Structures .
6. Array is also used to implement CPU scheduling Algorithms
Representation of Array
Types of Array
Ds chapter 2
Ds chapter 2
Sorting Concept
Data can be sorted or arranged either in ascending order or in
descending order which is called Sort Order .
Sorting Methods
1. Bubble Sort
2. Insertion Sort
3. Merge Sort
4. Quick Sort
5. Selection Sort
Bubble Sorting
Step 1 :-
13 11 14 15 19 9
11 13 14 15 19 9
11 13 14 15 19 9
11 13 14 15 19 9
11 13 14 15 19 9
11 13 14 15 9 19
Ds chapter 2
Ds chapter 2
Ds chapter 2
Step 5 :-
11 9 13 14 15 19
9 11 13 14 15 19
Hence List is Sorted
9 11 13 14 15 19
C Implementation of Bubble Sort
Ds chapter 2
Output:-
Ds chapter 2
Online website fro running program :-
https://www.onlinegdb.com/online_c_compiler

More Related Content

PPT
Data abstraction the walls
PPTX
Array in c programming
PPT
Abstract data types (adt) intro to data structure part 2
PPTX
Array in c
PPTX
Introduction to data structure
PPTX
Computer Science-Data Structures :Abstract DataType (ADT)
PPTX
Matlab Organizing Data
PDF
Lecture05 computer applicationsie1_dratifshahzad
Data abstraction the walls
Array in c programming
Abstract data types (adt) intro to data structure part 2
Array in c
Introduction to data structure
Computer Science-Data Structures :Abstract DataType (ADT)
Matlab Organizing Data
Lecture05 computer applicationsie1_dratifshahzad

What's hot (20)

PPTX
The awesome algorithm
PPTX
Ds stacks
PPTX
Presentation on Data Structure
PPTX
introduction to trees,graphs,hashing
PPTX
Slide 1.-datastructure
PPT
data structure
PPTX
PPTX
Dynamic memory allocation and linked lists
PPTX
DATA STRUCTURE
PPTX
introduction to Data Structure and classification
PDF
Data structure lecture 2 (pdf)
PPT
Data structures & algorithms lecture 3
PPTX
Mca ii dfs u-1 introduction to data structure
PDF
Data structure
PPT
Data Structures
PPTX
PPTX
DOC
Assignment Algo
PPTX
Assignment 2
PPT
Introductiont To Aray,Tree,Stack, Queue
The awesome algorithm
Ds stacks
Presentation on Data Structure
introduction to trees,graphs,hashing
Slide 1.-datastructure
data structure
Dynamic memory allocation and linked lists
DATA STRUCTURE
introduction to Data Structure and classification
Data structure lecture 2 (pdf)
Data structures & algorithms lecture 3
Mca ii dfs u-1 introduction to data structure
Data structure
Data Structures
Assignment Algo
Assignment 2
Introductiont To Aray,Tree,Stack, Queue
Ad

Similar to Ds chapter 2 (20)

PPTX
A singly linked list is a linear data structure
PPT
Mesics lecture 8 arrays in 'c'
PPTX
Arrays accessing using for loops
PDF
Data Structure - 3 Array: Concept & Implementation
PDF
Arrays
PPTX
ARRAYS.pptx
PPTX
unit 2.pptx
PDF
Lecture 2.8 Arrays.pdf
PPTX
Array vs array list
PPTX
Introduction-to-Arrays-in-Java . Exploring array
PPTX
the array, which stores a fixed-size sequential collection of elements of the...
PPTX
Arrays in Data Structure and Algorithm
PPT
Presentation of array
PPTX
PPTX
Various Operations Of Array(Data Structure Algorithm).pptx
PDF
Unit 2
PPTX
01245xsfwegrgdvdvsdfgvsdgsdfgsfsdgsdgsdgdg
PPTX
c2ppt.pptxslidenoteseceslidenoteseceslidenoteseceslidenoteseceslidenotesece
PPTX
a1.pptxArrays1Arrays1Arrays1Arrays1Arrays1
PPTX
array1.pptarrays conceptsarrays conceptsarrays concepts
A singly linked list is a linear data structure
Mesics lecture 8 arrays in 'c'
Arrays accessing using for loops
Data Structure - 3 Array: Concept & Implementation
Arrays
ARRAYS.pptx
unit 2.pptx
Lecture 2.8 Arrays.pdf
Array vs array list
Introduction-to-Arrays-in-Java . Exploring array
the array, which stores a fixed-size sequential collection of elements of the...
Arrays in Data Structure and Algorithm
Presentation of array
Various Operations Of Array(Data Structure Algorithm).pptx
Unit 2
01245xsfwegrgdvdvsdfgvsdgsdfgsfsdgsdgsdgdg
c2ppt.pptxslidenoteseceslidenoteseceslidenoteseceslidenoteseceslidenotesece
a1.pptxArrays1Arrays1Arrays1Arrays1Arrays1
array1.pptarrays conceptsarrays conceptsarrays concepts
Ad

More from Prof .Pragati Khade (11)

PDF
ch 2. Python module
PDF
Cybersecurity 140713064844-phpapp01 (1)-converted
PDF
Ooad with uml
PPTX
Chapter 1 big data
PPTX
Ch 2 Apraoaches Of Software Testing
PPTX
Software Testing
PDF
Share and mutual funds converted (1)
PPTX
Ch 3 . intrerest and annutiy
PPTX
Ch 2 profit and loss
PPTX
Ch1 ratio and proportion
PPTX
Polymorphism
ch 2. Python module
Cybersecurity 140713064844-phpapp01 (1)-converted
Ooad with uml
Chapter 1 big data
Ch 2 Apraoaches Of Software Testing
Software Testing
Share and mutual funds converted (1)
Ch 3 . intrerest and annutiy
Ch 2 profit and loss
Ch1 ratio and proportion
Polymorphism

Recently uploaded (20)

PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
1_English_Language_Set_2.pdf probationary
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Virtual and Augmented Reality in Current Scenario
PPTX
20th Century Theater, Methods, History.pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
My India Quiz Book_20210205121199924.pdf
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
Indian roads congress 037 - 2012 Flexible pavement
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
1_English_Language_Set_2.pdf probationary
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
TNA_Presentation-1-Final(SAVE)) (1).pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Virtual and Augmented Reality in Current Scenario
20th Century Theater, Methods, History.pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
B.Sc. DS Unit 2 Software Engineering.pptx
My India Quiz Book_20210205121199924.pdf
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
History, Philosophy and sociology of education (1).pptx
Unit 4 Computer Architecture Multicore Processor.pptx
What if we spent less time fighting change, and more time building what’s rig...
Hazard Identification & Risk Assessment .pdf
Practical Manual AGRO-233 Principles and Practices of Natural Farming
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Indian roads congress 037 - 2012 Flexible pavement

Ds chapter 2

  • 2. INTRODUCTION TO ARRAY An array is a finite ordered collection of homogeneous(same) data element which provides random access to the element . The array element share a common name . Declaration :- Array array name int a[5] size of an array Datatype For e.g array of integers a[8] 0 1 2 3 4 5 6 7 8 a 1 2 3 4 5 6 7 8 9
  • 3. Syntax Of array int arr[10]; char arr[10]; float arr[5]  It allows storing collection of information in one organised place . All elements are stored in continous memory location The size and type of an array cannot be changed after its compliation , hence array are called as Static and Structure .  Applications of Array 1. Array is used to store list of values . 2. Array is used to perform Matrix Operations . 3. Array is used to implement Search Algorithm . 4. Array is used to implement Sorting Algorithm . 5. Array is used to implement Data Structures . 6. Array is also used to implement CPU scheduling Algorithms
  • 7. Sorting Concept Data can be sorted or arranged either in ascending order or in descending order which is called Sort Order . Sorting Methods 1. Bubble Sort 2. Insertion Sort 3. Merge Sort 4. Quick Sort 5. Selection Sort
  • 8. Bubble Sorting Step 1 :- 13 11 14 15 19 9 11 13 14 15 19 9 11 13 14 15 19 9 11 13 14 15 19 9 11 13 14 15 19 9 11 13 14 15 9 19
  • 12. Step 5 :- 11 9 13 14 15 19 9 11 13 14 15 19 Hence List is Sorted 9 11 13 14 15 19
  • 13. C Implementation of Bubble Sort
  • 17. Online website fro running program :- https://www.onlinegdb.com/online_c_compiler