Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array
#1

Array

[attachment=16923]

Operations on Array-insertion

To insert the new elements in the existing array following different positions of the arrays used:
1At the end of the array.
2At the beginning of the array
3At given position

Insertion at the beginning of the array:
If UB=MAX then write array is overflow and Stop
Read Data
K <-UB
Repeat step 5 while k>=LB
A(k+1) <- A(k)
K<-k-1
A(LB) <-Data
Stop

Operations on Array-Deletion

Deletion is possible in three ways
From the end
From the begning
From the given location

Two-Dimensional Array

An array in which the elements need to be referred by two indices.
It is also called matrix.
Represented as:
A[i][j] for 0<=i<=m and 0<=j<=n
Where m is number of rows
n is number of columns
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.