SlideShare a Scribd company logo
1 of 19
Array in C Language
Group : 5
Name ID Program
1. Mosana Aunuj Nasim 151-15-342 C.S,E
2. Abir Kumar Datta 153-15-618 C.S.E
3.Shah Samrat Fahim 153-15-629 C.S.E
4. Tanveer Wahid C.S.E
What Is Array ??
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.
Why need to use array type?
Consider the following issue:
"We have a list of 1000 students' marks of an integer
type. If using the basic data type (int), we will declare
something like the following…"
int studMark0, studMark1, studMark2, ..., studMark999;
 Can you imagine how long we have to write the
declaration part by using normal variable declaration?
– int main(void)
– {
• int studMark1, studMark2, studMark3, studMark4,
…, …, studMark998, stuMark999, studMark1000;
• …
• …
• return 0;
– }
ARRAYS
 By using an array, we just declare like this,
int studMark[1000];
This will reserve 1000 contiguous memory locations for storing the students’ marks.
Graphically, this can be depicted as in the following figure.
Examples Using Arrays
Initializers :
int n[ 5 ] = { 1, 2, 3, 4, 5 };
– If not enough initializers, rightmost elements become 0
int n[ 5 ] = { 0 }
• All elements 0
– If too many a syntax error is produced syntax error
– C arrays have no bounds checking
If size omitted, initializers determine it
int n[ ] = { 1, 2, 3, 4, 5 };
– 5 initializers, therefore 5 element array
1 /* Fig.01: fig01.c
2 Histogram printing program */
3 #include <stdio.h>
4 #define SIZE 10
5
6 int main()
7 {
8 int n[ SIZE ] = { 19, 3, 15, 7, 11, 9, 13, 5, 17, 1 };
9 int i, j;
10
11 printf( "%s%13s%17sn", "Element", "Value", "Histogram"
);12
13 for ( i = 0; i <= SIZE - 1; i++ ) {
14 printf( "%7d%13d ", i, n[ i ]) ;
15
16 for ( j = 1; j <= n[ i ]; j++ ) /* print one bar
*/17 printf( "%c", '*' );
18
19 printf( "n" );
20 }
21
22 return 0;
23 }
Output
Element Value Histogram
0 19 *******************
1 3 ***
2 15 ***************
3 7 *******
4 11 ***********
5 9 *********
6 13 *************
7 5 *****
8 17 *****************
9 1 *
Types Of Array
Three Types Of Array
– One Dimensional Array(1-D)
– Two Dimensional Array(2-D)
– Multi Dimensional Array(A[s1][s2[s3][s4]…)
One Dimensional Array(1-D)
– 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
Multi Dimensional Array
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
Insertion In an Array
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
Deletion In an Array
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
Deletion In an Array
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
Abir ppt3
Abir ppt3

More Related Content

What's hot

What's hot (20)

Arrays in c
Arrays in cArrays in c
Arrays in c
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Basic array in c programming
Basic array in c programmingBasic array in c programming
Basic array in c programming
 
Array in c programming
Array in c programmingArray in c programming
Array in c programming
 
Two dimensional arrays
Two dimensional arraysTwo dimensional arrays
Two dimensional arrays
 
Array
ArrayArray
Array
 
2D Array
2D Array 2D Array
2D Array
 
concept of Array, 1D & 2D array
concept of Array, 1D & 2D arrayconcept of Array, 1D & 2D array
concept of Array, 1D & 2D array
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional array
 
Array in c
Array in cArray in c
Array in c
 
Data Structure Midterm Lesson Arrays
Data Structure Midterm Lesson ArraysData Structure Midterm Lesson Arrays
Data Structure Midterm Lesson Arrays
 
Arrays In C
Arrays In CArrays In C
Arrays In C
 
One dimensional 2
One dimensional 2One dimensional 2
One dimensional 2
 
Arrays and Pointers
Arrays and PointersArrays and Pointers
Arrays and Pointers
 
Arrays 1D and 2D , and multi dimensional
Arrays 1D and 2D , and multi dimensional Arrays 1D and 2D , and multi dimensional
Arrays 1D and 2D , and multi dimensional
 
Arraysincv109102017 180831194256
Arraysincv109102017 180831194256Arraysincv109102017 180831194256
Arraysincv109102017 180831194256
 
SPL 10 | One Dimensional Array in C
SPL 10 | One Dimensional Array in CSPL 10 | One Dimensional Array in C
SPL 10 | One Dimensional Array in C
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
C++ lecture 04
C++ lecture 04C++ lecture 04
C++ lecture 04
 
Arrays In C Language
Arrays In C LanguageArrays In C Language
Arrays In C Language
 

Similar to Abir ppt3 (20)

Arrays basics
Arrays basicsArrays basics
Arrays basics
 
Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings
 
Array,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN CArray,MULTI ARRAY, IN C
Array,MULTI ARRAY, IN C
 
Array.pptx
Array.pptxArray.pptx
Array.pptx
 
Array
ArrayArray
Array
 
Array in C.pdf
Array in C.pdfArray in C.pdf
Array in C.pdf
 
Array.pdf
Array.pdfArray.pdf
Array.pdf
 
CP Handout#9
CP Handout#9CP Handout#9
CP Handout#9
 
VIT351 Software Development VI Unit2
VIT351 Software Development VI Unit2VIT351 Software Development VI Unit2
VIT351 Software Development VI Unit2
 
L5 array
L5 arrayL5 array
L5 array
 
Arrays 06.ppt
Arrays 06.pptArrays 06.ppt
Arrays 06.ppt
 
arrays
arraysarrays
arrays
 
C (PPS)Programming for problem solving.pptx
C (PPS)Programming for problem solving.pptxC (PPS)Programming for problem solving.pptx
C (PPS)Programming for problem solving.pptx
 
Array i imp
Array  i impArray  i imp
Array i imp
 
ARRAYS.pptx
ARRAYS.pptxARRAYS.pptx
ARRAYS.pptx
 
Array
ArrayArray
Array
 
Unit4 Slides
Unit4 SlidesUnit4 Slides
Unit4 Slides
 
Array
ArrayArray
Array
 
Arrays
ArraysArrays
Arrays
 
COM1407: Arrays
COM1407: ArraysCOM1407: Arrays
COM1407: Arrays
 

Recently uploaded

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 

Recently uploaded (20)

★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 

Abir ppt3

  • 1. Array in C Language
  • 2. Group : 5 Name ID Program 1. Mosana Aunuj Nasim 151-15-342 C.S,E 2. Abir Kumar Datta 153-15-618 C.S.E 3.Shah Samrat Fahim 153-15-629 C.S.E 4. Tanveer Wahid C.S.E
  • 4. 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.
  • 5. Why need to use array type? Consider the following issue: "We have a list of 1000 students' marks of an integer type. If using the basic data type (int), we will declare something like the following…" int studMark0, studMark1, studMark2, ..., studMark999;  Can you imagine how long we have to write the declaration part by using normal variable declaration? – int main(void) – { • int studMark1, studMark2, studMark3, studMark4, …, …, studMark998, stuMark999, studMark1000; • … • … • return 0; – }
  • 6. ARRAYS  By using an array, we just declare like this, int studMark[1000]; This will reserve 1000 contiguous memory locations for storing the students’ marks. Graphically, this can be depicted as in the following figure.
  • 7. Examples Using Arrays Initializers : int n[ 5 ] = { 1, 2, 3, 4, 5 }; – If not enough initializers, rightmost elements become 0 int n[ 5 ] = { 0 } • All elements 0 – If too many a syntax error is produced syntax error – C arrays have no bounds checking If size omitted, initializers determine it int n[ ] = { 1, 2, 3, 4, 5 }; – 5 initializers, therefore 5 element array
  • 8. 1 /* Fig.01: fig01.c 2 Histogram printing program */ 3 #include <stdio.h> 4 #define SIZE 10 5 6 int main() 7 { 8 int n[ SIZE ] = { 19, 3, 15, 7, 11, 9, 13, 5, 17, 1 }; 9 int i, j; 10 11 printf( "%s%13s%17sn", "Element", "Value", "Histogram" );12 13 for ( i = 0; i <= SIZE - 1; i++ ) { 14 printf( "%7d%13d ", i, n[ i ]) ; 15 16 for ( j = 1; j <= n[ i ]; j++ ) /* print one bar */17 printf( "%c", '*' ); 18 19 printf( "n" ); 20 } 21 22 return 0; 23 }
  • 9. Output Element Value Histogram 0 19 ******************* 1 3 *** 2 15 *************** 3 7 ******* 4 11 *********** 5 9 ********* 6 13 ************* 7 5 ***** 8 17 ***************** 9 1 *
  • 10. Types Of Array Three Types Of Array – One Dimensional Array(1-D) – Two Dimensional Array(2-D) – Multi Dimensional Array(A[s1][s2[s3][s4]…)
  • 11. One Dimensional Array(1-D) – 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.]
  • 12. 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
  • 13. Multi Dimensional Array 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
  • 14. Insertion In an Array 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
  • 15. 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
  • 16. Deletion In an Array 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
  • 17. Deletion In an Array 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