SlideShare a Scribd company logo
1 of 10
TYPES OF ARRAYS
1. ONE DIMENSIONAL ARRAY
2. TWO DIMENSIONAL ARRAY
3. MULTI-DIMENSIONAL ARRAY
WRITTEN BY:
SYED ANS ALI
ARRAY
Define:
Array is a collection of data item that is
accessed by using a common name it is known
as Array
Syntax
function type name[subscript];
WHY WE ARE USING ARRAY?
 Arrays a kind of data structure . An array is used
to store a collection of data, but it is often more
useful to think of an array as a collection of
variables of the same type.
 Instead of declaring individual variables, such as
number0, number1, ..., and number99, you
declare one array variable such as numbers and
use numbers[0], numbers[1], and ...,
numbers[99] to represent individual variables. A
specific element in an array is accessed by an
index
TYPES OF ARRAY
There are three types of array
1) One Dimensional Array
2) Two Dimensional Array
3) Multi Dimensional Array
ONE DIMENSIONAL ARRAY
An array that contain only one subscript it is
known as one dimensional array
Program:
OUTPUT
TWO DIMENSIONAL ARRAY
An array that contain two subscript is called
Two dimensional array
2-d array is like a table
PROGRAM
OUTPUT
MULTI DIMENSIONAL ARRAY
An array that contain more than two subscript
is known as Multi Dimensional array
Program

More Related Content

What's hot

What's hot (20)

Arrays
ArraysArrays
Arrays
 
SD & D Data Types
SD & D Data TypesSD & D Data Types
SD & D Data Types
 
September 9 2008
September 9 2008September 9 2008
September 9 2008
 
Java array
Java arrayJava array
Java array
 
How to Create an Array & types in PHP
How to Create an Array & types in PHP How to Create an Array & types in PHP
How to Create an Array & types in PHP
 
Loops and arrays
Loops and arraysLoops and arrays
Loops and arrays
 
PHP Basic & Arrays
PHP Basic & ArraysPHP Basic & Arrays
PHP Basic & Arrays
 
Array andfunction
Array andfunctionArray andfunction
Array andfunction
 
Java basic datatypes
Java basic datatypesJava basic datatypes
Java basic datatypes
 
Chapter 7.0
Chapter 7.0 Chapter 7.0
Chapter 7.0
 
Data structure
Data structureData structure
Data structure
 
Arrays
ArraysArrays
Arrays
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Lecture7
Lecture7Lecture7
Lecture7
 
Lecture 2a arrays
Lecture 2a arraysLecture 2a arrays
Lecture 2a arrays
 
Java Generics wildcards
Java Generics wildcardsJava Generics wildcards
Java Generics wildcards
 
Collections (1)
Collections (1)Collections (1)
Collections (1)
 
Dotnet Programming concepts difference faqs-1
Dotnet Programming concepts difference faqs-1Dotnet Programming concepts difference faqs-1
Dotnet Programming concepts difference faqs-1
 
Assignment Algo
Assignment AlgoAssignment Algo
Assignment Algo
 
Introduction to array and string
Introduction to array and stringIntroduction to array and string
Introduction to array and string
 

Similar to Types of Arrays

Similar to Types of Arrays (20)

Presentation on array
Presentation on array Presentation on array
Presentation on array
 
ARRAYS.pptx
ARRAYS.pptxARRAYS.pptx
ARRAYS.pptx
 
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
Arrays in cArrays in c
Arrays in c
 
BHARGAVIARRAY.PPT.pptx
BHARGAVIARRAY.PPT.pptxBHARGAVIARRAY.PPT.pptx
BHARGAVIARRAY.PPT.pptx
 
Arrays
ArraysArrays
Arrays
 
Arrays
ArraysArrays
Arrays
 
arrays.docx
arrays.docxarrays.docx
arrays.docx
 
C++ arrays part1
C++ arrays part1C++ arrays part1
C++ arrays part1
 
Arrays
ArraysArrays
Arrays
 
Array
ArrayArray
Array
 
ARRAY.pptx
ARRAY.pptxARRAY.pptx
ARRAY.pptx
 
Arrays accessing using for loops
Arrays accessing using for loopsArrays accessing using for loops
Arrays accessing using for loops
 
Arrays.pptx
Arrays.pptxArrays.pptx
Arrays.pptx
 
Array
ArrayArray
Array
 
Week 11.pptx
Week 11.pptxWeek 11.pptx
Week 11.pptx
 
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
 
OOPs with java
OOPs with javaOOPs with java
OOPs with java
 
Java arrays (1)
Java arrays (1)Java arrays (1)
Java arrays (1)
 
Arrays declartion and initialization
Arrays declartion and initializationArrays declartion and initialization
Arrays declartion and initialization
 

More from Ans Ali

Project,ATM Project,Java Atm Project
Project,ATM Project,Java Atm ProjectProject,ATM Project,Java Atm Project
Project,ATM Project,Java Atm ProjectAns Ali
 
Sort techniques
Sort techniquesSort techniques
Sort techniquesAns Ali
 
Dbms quries
Dbms quriesDbms quries
Dbms quriesAns Ali
 
chap 2 Ex#1.1
chap 2 Ex#1.1chap 2 Ex#1.1
chap 2 Ex#1.1Ans Ali
 
Intro to computing
Intro to computingIntro to computing
Intro to computingAns Ali
 
File handling
File handlingFile handling
File handlingAns Ali
 
MS-Commands
 MS-Commands MS-Commands
MS-CommandsAns Ali
 
Into to programming fundamentals
Into to programming fundamentalsInto to programming fundamentals
Into to programming fundamentalsAns Ali
 

More from Ans Ali (8)

Project,ATM Project,Java Atm Project
Project,ATM Project,Java Atm ProjectProject,ATM Project,Java Atm Project
Project,ATM Project,Java Atm Project
 
Sort techniques
Sort techniquesSort techniques
Sort techniques
 
Dbms quries
Dbms quriesDbms quries
Dbms quries
 
chap 2 Ex#1.1
chap 2 Ex#1.1chap 2 Ex#1.1
chap 2 Ex#1.1
 
Intro to computing
Intro to computingIntro to computing
Intro to computing
 
File handling
File handlingFile handling
File handling
 
MS-Commands
 MS-Commands MS-Commands
MS-Commands
 
Into to programming fundamentals
Into to programming fundamentalsInto to programming fundamentals
Into to programming fundamentals
 

Recently uploaded

भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

Types of Arrays

  • 1. TYPES OF ARRAYS 1. ONE DIMENSIONAL ARRAY 2. TWO DIMENSIONAL ARRAY 3. MULTI-DIMENSIONAL ARRAY WRITTEN BY: SYED ANS ALI
  • 2. ARRAY Define: Array is a collection of data item that is accessed by using a common name it is known as Array Syntax function type name[subscript];
  • 3. WHY WE ARE USING ARRAY?  Arrays a kind of data structure . An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.  Instead of declaring individual variables, such as number0, number1, ..., and number99, you declare one array variable such as numbers and use numbers[0], numbers[1], and ..., numbers[99] to represent individual variables. A specific element in an array is accessed by an index
  • 4. TYPES OF ARRAY There are three types of array 1) One Dimensional Array 2) Two Dimensional Array 3) Multi Dimensional Array
  • 5. ONE DIMENSIONAL ARRAY An array that contain only one subscript it is known as one dimensional array Program:
  • 7. TWO DIMENSIONAL ARRAY An array that contain two subscript is called Two dimensional array 2-d array is like a table
  • 10. MULTI DIMENSIONAL ARRAY An array that contain more than two subscript is known as Multi Dimensional array Program

Editor's Notes

  1. Output