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

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 acollection of data item that is accessed by using a common name it is known as Array Syntax function type name[subscript];
  • 3.
    WHY WE AREUSING 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 Thereare three types of array 1) One Dimensional Array 2) Two Dimensional Array 3) Multi Dimensional Array
  • 5.
    ONE DIMENSIONAL ARRAY Anarray that contain only one subscript it is known as one dimensional array Program:
  • 6.
  • 7.
    TWO DIMENSIONAL ARRAY Anarray that contain two subscript is called Two dimensional array 2-d array is like a table
  • 8.
  • 9.
  • 10.
    MULTI DIMENSIONAL ARRAY Anarray that contain more than two subscript is known as Multi Dimensional array Program

Editor's Notes