Array address Calculation Single and double dimensional array
Single dimensional arrayAddress=B+W (I-L) B=base addressW=size of the elementI=index of the element whose address is to be calculatedL=Lower boundary of the array
Array address Calculation
Binary Search
Single dimensional array
Address=B+W (I-L)
B=base address
W=size of the element
I=index of the element whose address is to be calculated
L=Lower boundary of the array

Double dimensional array
In a double dimensional array the elements can be arranged in two ways. Row major order and column major order.
Row major order:
To calculate the address of cell the formula is
Address of A [ I ][ J ] = B + W * [ N * ( I – Lr ) + ( J – Lc ) ]
column major order.
To calculate the address of cell the formula is
Address of A [ I ][ J ] = B + W * [( I – Lr ) + M * ( J – Lc )]
Where B=Base address
W=size of the data type stored in the array
Lr=Lower bound of row
Lc=Lower bound of column
I= The index of the row
J=The index of column

Watch java videos
Related Posts
Continue learning with these related articles

ISC Practical 2027: College Enrolment Code Validator and Stream Report – Algorithm and Java Program
Fully solved ISC Computer Science Practical 2027 question: validate college enrolment codes made of a stream, year and serial number, give the exact reason for each rejection, auto-correct lowercase streams and prepare a stream-wise report.

ISC Practical 2027: Digital Lock Security Code Analyzer – Algorithm and Java Program
Fully solved ISC Computer Science Practical 2027 number-logic question: for a 5 to 10 digit security code, find the first and last digits, odd and even position sums, product of non-zero digits, digit frequency and classify the code as STRONG, MODERATE or WEAK.

Boolean Algebra for ISC Class 12: Laws, Canonical SOP and POS, and Simplification
ISC Class 12 Computer Science notes on Boolean algebra: all the laws and theorems, duality, De Morgan's laws, minterms and maxterms, converting to canonical SOP and POS, and step-by-step algebraic simplification with solved examples.