Question
Easy

A 2-D array A[4...7,-1...3] requires 2 bytes of storage space for each element. If the array is stored in row-major form having base address 100, then the address of A[6, 2] will be...................

1
150
2
126
3
200
4
112
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter:
Topic:
Correct Answer
Option B
Explanation

The correct option is (2): The address of an element in a two-dimensional array stored in Row-Major Order (RMO) is calculated using a specific formula. RMO means that all elements of the first row are stored contiguously in memory, followed by all elements of the second row, and so on. The formula for RMO is: Address(A\[i, j\]) = Base Address + W \* \[ (i - L1) \* N2 +…Read More