Question 23Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 3 (5:00 PM)

A 2D array B[4][5] is stored in row-major order. The base address of the array is 5000, and

A 2D array B[4][5] is stored in row-major order. The base address of the array is 5000, and each element occupies 2 bytes. What is the address of B[2][3]?
  1. A5054
  2. B5039
  3. C5048
  4. D5026
Show answerHide answer

Correct answer: (D) 5026

Explanation

Row-major address = Base + (i × columns + j) × size = 5000 + (2 × 5 + 3) × 2 = 5000 + 26 = 5026.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 3 (5:00 PM)

This is question 23 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 3 (5:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.