SlideShare a Scribd company logo
1 of 11
What Is Array ??
 Collection Of same type of data.
 Data Type ( Int, float, double, char).
 Saves data in a sequence.
 Examples:
 1. Employees Info of an organization.
 2. Score of students of a class.
 3. Table of daily rainfall data.
 4. Temperature record of hours.
 Three Types Of Array
 One Dimensional Array(1-D)
 Two Dimensional Array(2-D)
 Multi Dimensional Array(A[s1][s2[s3][s4]…)
 Initialization:
 Type Array_name [Size];
 Type Array_name [Size] = {list of Values};
 Example:
 int A[10];
 int A[5] ={50,60,70,80,90};
 User Define:
 int A[n]; [Size of Array declare by User.]
Two Dimensional Array(2-D)
 Initialization:
 Type Array_name[row_size][column_size];
 Type Array_name[row_size][column_size]={{s1},{s2},{s3}};
 Here s1,s2,s3 refers to sets of number.
 Example:
 int A[3][3] ;
 int A[3][3] = {{10,20,45},{42,79,81},{89,9,36}};
 User Define:
 int A[r][n];
 Value of {r,n} given by user .
 Initialization:
 Type Array_name[s1][s2][s3]…..[sm];
Example:
int survey [3][5][3];
float table [5][4][5][3];
Pros & Cons:
Two dimensional array often
consider as multi dimensional array.
Multi dimensional array is derived
from basic C Language.
Multi Dimensional array
Example
 One Dimensional Array(1-D):
 Loops runs from 0 to n-1 th index.
 Sorting might involve if data was ask in sorting mode.
How 1-D array insertion Works:
For 0 to n-1
{input value;(Using scanf)}
int A[5]
Insertion In An Array
 Two Dimensional Array(2 - D):
 Loops runs
for 0 to row – 1
{for 0 to column – 1
input value;(scanf) }
How It works:
int A[3][4];
Step 1 Step 2 Step 3
 One Dimensional Array(1-D):
 User given input.
 Search for data
 Runs in the loops looking for the given input.
2 Condition: Found or Not found
Found condition:
Example: search: 4 (Found if available).
 Not Found (Print Not Found)
ORIGIN (Array) After Deletion
Two Dimensional Array(2D)
 User Given Input(search: 12)
 Process:
Runs inside the loops looking for element.
Condition:
If found delete the input value and replace by ‘0’
Else print not found.
Example: Before After
A Presentation About Array Manipulation(Insertion & Deletion in an array)

More Related Content

What's hot

What's hot (20)

Array ppt
Array pptArray ppt
Array ppt
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshare
 
358 33 powerpoint-slides_5-arrays_chapter-5
358 33 powerpoint-slides_5-arrays_chapter-5358 33 powerpoint-slides_5-arrays_chapter-5
358 33 powerpoint-slides_5-arrays_chapter-5
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
Strings
StringsStrings
Strings
 
Programming in c Arrays
Programming in c ArraysProgramming in c Arrays
Programming in c Arrays
 
Arrays and Strings
Arrays and Strings Arrays and Strings
Arrays and Strings
 
C++ Arrays
C++ ArraysC++ Arrays
C++ Arrays
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
 
Presentation on array
Presentation on array Presentation on array
Presentation on array
 
Array
ArrayArray
Array
 
Introduction to Array ppt
Introduction to Array pptIntroduction to Array ppt
Introduction to Array ppt
 
Arrays
ArraysArrays
Arrays
 
Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)
 
Arrays
ArraysArrays
Arrays
 
1 D Arrays in C++
1 D Arrays in C++1 D Arrays in C++
1 D Arrays in C++
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 
Sorting
SortingSorting
Sorting
 
Array Presentation
Array PresentationArray Presentation
Array Presentation
 

Similar to A Presentation About Array Manipulation(Insertion & Deletion in an array)

Similar to A Presentation About Array Manipulation(Insertion & Deletion in an array) (20)

Arrays
ArraysArrays
Arrays
 
C Programming : Arrays
C Programming : ArraysC Programming : Arrays
C Programming : Arrays
 
Arrays in C language
Arrays in C languageArrays in C language
Arrays in C language
 
Arrays
ArraysArrays
Arrays
 
Arrays
ArraysArrays
Arrays
 
Abir ppt3
Abir ppt3Abir ppt3
Abir ppt3
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdf
 
Array
ArrayArray
Array
 
Unit 3_Numpy_Vsp.pptx
Unit 3_Numpy_Vsp.pptxUnit 3_Numpy_Vsp.pptx
Unit 3_Numpy_Vsp.pptx
 
Unit 2 dsa LINEAR DATA STRUCTURE
Unit 2 dsa LINEAR DATA STRUCTUREUnit 2 dsa LINEAR DATA STRUCTURE
Unit 2 dsa LINEAR DATA STRUCTURE
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functions
 
Arrays
ArraysArrays
Arrays
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functions
 
Array
ArrayArray
Array
 
Basic of array and data structure, data structure basics, array, address calc...
Basic of array and data structure, data structure basics, array, address calc...Basic of array and data structure, data structure basics, array, address calc...
Basic of array and data structure, data structure basics, array, address calc...
 
Array assignment
Array assignmentArray assignment
Array assignment
 
Array
ArrayArray
Array
 
CSEG1001Unit 3 Arrays and Strings
CSEG1001Unit 3 Arrays and StringsCSEG1001Unit 3 Arrays and Strings
CSEG1001Unit 3 Arrays and Strings
 
unit1Intro_final.pptx
unit1Intro_final.pptxunit1Intro_final.pptx
unit1Intro_final.pptx
 
Arrays In C
Arrays In CArrays In C
Arrays In C
 

Recently uploaded

Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodManicka Mamallan Andavar
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsResearcher Researcher
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solidnamansinghjarodiya
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdfsahilsajad201
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 

Recently uploaded (20)

Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument method
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending Actuators
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solid
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 

A Presentation About Array Manipulation(Insertion & Deletion in an array)

  • 1.
  • 2. What Is Array ??  Collection Of same type of data.  Data Type ( Int, float, double, char).  Saves data in a sequence.  Examples:  1. Employees Info of an organization.  2. Score of students of a class.  3. Table of daily rainfall data.  4. Temperature record of hours.
  • 3.  Three Types Of Array  One Dimensional Array(1-D)  Two Dimensional Array(2-D)  Multi Dimensional Array(A[s1][s2[s3][s4]…)
  • 4.  Initialization:  Type Array_name [Size];  Type Array_name [Size] = {list of Values};  Example:  int A[10];  int A[5] ={50,60,70,80,90};  User Define:  int A[n]; [Size of Array declare by User.]
  • 5. Two Dimensional Array(2-D)  Initialization:  Type Array_name[row_size][column_size];  Type Array_name[row_size][column_size]={{s1},{s2},{s3}};  Here s1,s2,s3 refers to sets of number.  Example:  int A[3][3] ;  int A[3][3] = {{10,20,45},{42,79,81},{89,9,36}};  User Define:  int A[r][n];  Value of {r,n} given by user .
  • 6.  Initialization:  Type Array_name[s1][s2][s3]…..[sm]; Example: int survey [3][5][3]; float table [5][4][5][3]; Pros & Cons: Two dimensional array often consider as multi dimensional array. Multi dimensional array is derived from basic C Language. Multi Dimensional array Example
  • 7.  One Dimensional Array(1-D):  Loops runs from 0 to n-1 th index.  Sorting might involve if data was ask in sorting mode. How 1-D array insertion Works: For 0 to n-1 {input value;(Using scanf)} int A[5]
  • 8. Insertion In An Array  Two Dimensional Array(2 - D):  Loops runs for 0 to row – 1 {for 0 to column – 1 input value;(scanf) } How It works: int A[3][4]; Step 1 Step 2 Step 3
  • 9.  One Dimensional Array(1-D):  User given input.  Search for data  Runs in the loops looking for the given input. 2 Condition: Found or Not found Found condition: Example: search: 4 (Found if available).  Not Found (Print Not Found) ORIGIN (Array) After Deletion
  • 10. Two Dimensional Array(2D)  User Given Input(search: 12)  Process: Runs inside the loops looking for element. Condition: If found delete the input value and replace by ‘0’ Else print not found. Example: Before After