Array

Introduction to Array

An array is a collection of same data type, whose individual elements are arranged in a regular pattern. Practical description of the arrays. Example: A(8)={1,8,3,6,1,4,7,5} So now we will show you how the array elements are stored in memory A(0) A(1) A(2) A(3) A(4) A(5) A(6) A(7) 2 8 3 6 1 4 7 5 …

Introduction to Array Read More »

Types of Array

Types of Array Static array They have fixed size when the array is declared and can not be altered during execution. This is inflexible for certain circumstances (one has to re-entry the program, change the dimension (s) and re-compile) and wasteful in terms of storage space (since one might declare a very large array to …

Types of Array Read More »

One Dimensional Array

 One Dimensional Array Let us consider A is a one dimensional array which have four elements like: A(1) A(2), A(3), A(4) these are stored in the computer and their values will be as: A(1) A(2) A(3) A4) 2 8 3 6 This is an example of an array which contains integer numbers: Assume that the …

One Dimensional Array Read More »

Two Dimensional Array

 Two Dimensional Array 2 4 6 8 3 5 9 11 This array represents a matrix since it is two-dimensional. Let us consider a 4 x 3 array A which will be stored in the computer as: A(1,1), A(2, 1), A(3,1), A(4,1), A(1,2), A(2,2), A(3,2) A(4,2), A(1,3), A(2,3), A(3,3), A(4,3) Here the second subscript is …

Two Dimensional Array Read More »

Scroll to Top