-->

Encrypting your link and protect the link from viruses, malware, thief, etc! Made your link safe to visit.

Basics of Array



Linear Array:
Homogeneous data:
         a) Elements are represented through indexes.
         b) Elements are saved in sequential in memory locations.
Number of elements, N –> length or size of an array.
         If:
                 UB : upper bound ( the largest index)
                 LB : lower bound (the smallest index)
         Then: N = UB – LB + 1
                   Length = N = UB when LB = 1
All elements in A are written symbolically as, 1 .. n is the subscript.
                 A1, A2, A3, .... , An
In FORTRAN and BASIC à A(1), A(2), ..., A(N)
In Pascal, C/C++ and Java à A[0], A[1], ..., A[N-1]
subscript starts from 0
                 LB = 0, UB = N–1

Advantages of an Array:
Very simple
Economy – if full use of memory
Random accessed at the same time
Disadvantage of an Array:
wasting memory if not fully used


ST

Social

Recent

⬇⬇Get Your Link⬇⬇