SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere Àhnliche Inhalte

Was ist angesagt?

Java array
Java arrayJava array
Java array
shengsheng
 
Chapter 7.0
Chapter 7.0 Chapter 7.0
Chapter 7.0
sotlsoc
 
Lecture 2a arrays
Lecture 2a arraysLecture 2a arrays
Lecture 2a arrays
Victor Palmar
 
Assignment Algo
Assignment AlgoAssignment Algo
Assignment Algo
rihannaiu
 

Was ist angesagt? (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
 

Ähnlich wie Types of Arrays

Presentation on array
Presentation on array Presentation on array
Presentation on array
topu93
 
BHARGAVIARRAY.PPT.pptx
BHARGAVIARRAY.PPT.pptxBHARGAVIARRAY.PPT.pptx
BHARGAVIARRAY.PPT.pptx
Sasideepa
 
Java arrays (1)
Java arrays (1)Java arrays (1)
Java arrays (1)
Liza Abello
 

Ähnlich wie 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
 

Mehr von 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
 

KĂŒrzlich hochgeladen

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 

KĂŒrzlich hochgeladen (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
TỔNG ÔN TáșŹP THI VÀO LỚP 10 MÔN TIáșŸNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGở Â...
TỔNG ÔN TáșŹP THI VÀO LỚP 10 MÔN TIáșŸNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGở Â...TỔNG ÔN TáșŹP THI VÀO LỚP 10 MÔN TIáșŸNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGở Â...
TỔNG ÔN TáșŹP THI VÀO LỚP 10 MÔN TIáșŸNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGở Â...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

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

Hinweis der Redaktion

  1. Output