Mis Presentation
Mis Presentation
Mis Presentation
LEARNING
ARRAYS
WHAT IS AN ARRAY?
01
02
ITEMS TO BE STORED.
STRUCTURE.
Advantage of Array
Properties of Array
The array contains the following properties.
1. Each element of an array is of same data
type and carries the same size, i.e., int = 4
bytes.
2. Elements of the array are stored at contiguous
memory locations where the first element is
stored at the smallest memory location.
3. Elements of the array can be randomly
accessed since we can calculate the address of
each element of the array with the given base
address and the size of the data element.
Declaration of Array
Types of Array
A one-dimensional array is a
kind of linear array. It involves
single sub-scripting. The []
(brackets) is used for the
subscript of the array and to
declare and access the
elements from the array.
Syntax: DataType ArrayName
[size];
For example: int a[10];
Multi-Dimensional Arrays