SlideShare a Scribd company logo
1 of 11
Sardar Vallabhbhai Patel
institute of technology
Name - Nariya Priyank
ID -16BEMEF011
Enrollment no. -160410119047
Subject -CPU
Topic -Concept of Array, One dimension
array and two dimension array
Branch -Mechanical-1
Batch -A
Introductions of array
-An array
 A single name for a collection of data values
 All of the same data type
 Subscript notation to identify one of the values
 The array is important concept and helps the
programmer in managing many variable of the
same type
Arrays can be divided into three
category
 1. Single Dimensional Array
 2. Two dimensional Array
 3. Multi dimensional Array
Some example where the concept of an
array can be used
List of product and their cost sold by a store
Test score of a class of a student
Table of a daily rainfall data
List of the costumer and their telephone data
Single Dimensional Array
Dimensional refers to the array’s size , which is how
big the array is.
A single or one dimensional array declaration has
the following form,
datatype arrayname[size];
Here, datatype defines the type of array elements,
it can be int, char, float, long int etc.
The arrayname is the name of variable which
represents the array, while size which is represents
in the [ ] symbol represents the size of the array.
Creating Arrays
 Data type array-name[size];
Example:
int num[10];
num[0]references the first element in the array.
num[9]references the last element in the array.
Graphically, array a can be represented like this.
Array elements
Index 0 1 2 3 4 5 6 7 8 9
12 45 34 2 33 65 76 8 6 67
Declaring Array Variables
 Data type array name[index];
Example:
int list[10];
char num[15];
float hat[20];
The Length of Arrays
 Once an array is created, its size is fixed. It
cannot be changed.
For Example,
int arr[10];
You can not insert any number to arr[11]
location because it is not initialized.
Two dimensional
 This type of array represents and store data in
matrix form
 The syntax for two dimensional array is :
datatype variablename [rowsize][columnsize]
 Where ,variablename represent the name of an
array ,rowsize indicate the number of rows in
table ,columnsize indicates number of columns
in an array .
 For example
Int sales[3][12];
Here , the row size is 3, so row number spans from 0 to
2,while column number spans from 0 to 11
Column
row 0 1 2 3 4 5 6 7 8 9 10 11
0
1
2
50 23 7 11 23 48 52 69 54 42 88 99
25 23 26 49 50 41 20 56 17 15 23 62
23 15 42 52 69 87 86 95 58 56 96 36
Example of Two dimension Array
Thank you

More Related Content

What's hot (20)

Array in C
Array in CArray in C
Array in C
 
Array
ArrayArray
Array
 
Presentation on array
Presentation on array Presentation on array
Presentation on array
 
Arrays In C++
Arrays In C++Arrays In C++
Arrays In C++
 
Structures in c language
Structures in c languageStructures in c language
Structures in c language
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Array in c language
Array in c languageArray in c language
Array in c language
 
Arrays
ArraysArrays
Arrays
 
Data structure
Data structureData structure
Data structure
 
Arrays
ArraysArrays
Arrays
 
ARRAY
ARRAYARRAY
ARRAY
 
Array in c
Array in cArray in c
Array in c
 
Enumerated data types in C
Enumerated data types in CEnumerated data types in C
Enumerated data types in C
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
 
Arrays in C language
Arrays in C languageArrays in C language
Arrays in C language
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
Arrays and Strings
Arrays and Strings Arrays and Strings
Arrays and Strings
 
Structure in C
Structure in CStructure in C
Structure in C
 
Arrays
ArraysArrays
Arrays
 
2D Array
2D Array 2D Array
2D Array
 

Similar to concept of Array, 1D & 2D array (20)

lec 2- array declaration and initialization.pptx
lec 2- array declaration and initialization.pptxlec 2- array declaration and initialization.pptx
lec 2- array declaration and initialization.pptx
 
Arrays
ArraysArrays
Arrays
 
Introduction to Arrays in C
Introduction to Arrays in CIntroduction to Arrays in C
Introduction to Arrays in C
 
Array and its types and it's implemented programming Final.pdf
Array and its types and it's implemented programming Final.pdfArray and its types and it's implemented programming Final.pdf
Array and its types and it's implemented programming Final.pdf
 
Chap09
Chap09Chap09
Chap09
 
3.ArraysandPointers.pptx
3.ArraysandPointers.pptx3.ArraysandPointers.pptx
3.ArraysandPointers.pptx
 
Arrays
ArraysArrays
Arrays
 
Arrays
ArraysArrays
Arrays
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Arrays
ArraysArrays
Arrays
 
BHARGAVIARRAY.PPT.pptx
BHARGAVIARRAY.PPT.pptxBHARGAVIARRAY.PPT.pptx
BHARGAVIARRAY.PPT.pptx
 
Learn Java Part 9
Learn Java Part 9Learn Java Part 9
Learn Java Part 9
 
Array
ArrayArray
Array
 
Array
ArrayArray
Array
 
Algo>Arrays
Algo>ArraysAlgo>Arrays
Algo>Arrays
 
Chapter 4 (Part I) - Array and Strings.pdf
Chapter 4 (Part I) - Array and Strings.pdfChapter 4 (Part I) - Array and Strings.pdf
Chapter 4 (Part I) - Array and Strings.pdf
 
Array in c
Array in cArray in c
Array in c
 
Array
ArrayArray
Array
 
Array in-c
Array in-cArray in-c
Array in-c
 
Array in c language
Array in c language Array in c language
Array in c language
 

More from Sangani Ankur

The meaning and process of communication
The meaning and process of communicationThe meaning and process of communication
The meaning and process of communicationSangani Ankur
 
seminar for collage level
seminar for collage levelseminar for collage level
seminar for collage levelSangani Ankur
 
projection of points-engineering graphics
projection of points-engineering graphicsprojection of points-engineering graphics
projection of points-engineering graphicsSangani Ankur
 
bottom up process for nenometirial
bottom up process for nenometirialbottom up process for nenometirial
bottom up process for nenometirialSangani Ankur
 

More from Sangani Ankur (6)

The meaning and process of communication
The meaning and process of communicationThe meaning and process of communication
The meaning and process of communication
 
Ramjet engines
Ramjet enginesRamjet engines
Ramjet engines
 
Laser
LaserLaser
Laser
 
seminar for collage level
seminar for collage levelseminar for collage level
seminar for collage level
 
projection of points-engineering graphics
projection of points-engineering graphicsprojection of points-engineering graphics
projection of points-engineering graphics
 
bottom up process for nenometirial
bottom up process for nenometirialbottom up process for nenometirial
bottom up process for nenometirial
 

Recently uploaded

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
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
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
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
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
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
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
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
 
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
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
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
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 

Recently uploaded (20)

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
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
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
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
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
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
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
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
 
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
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
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
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 

concept of Array, 1D & 2D array

  • 1. Sardar Vallabhbhai Patel institute of technology Name - Nariya Priyank ID -16BEMEF011 Enrollment no. -160410119047 Subject -CPU Topic -Concept of Array, One dimension array and two dimension array Branch -Mechanical-1 Batch -A
  • 2. Introductions of array -An array  A single name for a collection of data values  All of the same data type  Subscript notation to identify one of the values  The array is important concept and helps the programmer in managing many variable of the same type
  • 3. Arrays can be divided into three category  1. Single Dimensional Array  2. Two dimensional Array  3. Multi dimensional Array Some example where the concept of an array can be used List of product and their cost sold by a store Test score of a class of a student Table of a daily rainfall data List of the costumer and their telephone data
  • 4. Single Dimensional Array Dimensional refers to the array’s size , which is how big the array is. A single or one dimensional array declaration has the following form, datatype arrayname[size]; Here, datatype defines the type of array elements, it can be int, char, float, long int etc. The arrayname is the name of variable which represents the array, while size which is represents in the [ ] symbol represents the size of the array.
  • 5. Creating Arrays  Data type array-name[size]; Example: int num[10]; num[0]references the first element in the array. num[9]references the last element in the array. Graphically, array a can be represented like this. Array elements Index 0 1 2 3 4 5 6 7 8 9 12 45 34 2 33 65 76 8 6 67
  • 6. Declaring Array Variables  Data type array name[index]; Example: int list[10]; char num[15]; float hat[20];
  • 7. The Length of Arrays  Once an array is created, its size is fixed. It cannot be changed. For Example, int arr[10]; You can not insert any number to arr[11] location because it is not initialized.
  • 8. Two dimensional  This type of array represents and store data in matrix form  The syntax for two dimensional array is : datatype variablename [rowsize][columnsize]  Where ,variablename represent the name of an array ,rowsize indicate the number of rows in table ,columnsize indicates number of columns in an array .
  • 9.  For example Int sales[3][12]; Here , the row size is 3, so row number spans from 0 to 2,while column number spans from 0 to 11 Column row 0 1 2 3 4 5 6 7 8 9 10 11 0 1 2 50 23 7 11 23 48 52 69 54 42 88 99 25 23 26 49 50 41 20 56 17 15 23 62 23 15 42 52 69 87 86 95 58 56 96 36
  • 10. Example of Two dimension Array