Frame buffer array is addressed in row major order for

2014

A frame buffer array is addressed in row major order for a monitor with pixel locations starting from (0,0) and ending with (100,100). What is address of the pixel(6,10)? Assume one bit storage per pixel and starting pixel location is at 0.

  1. A.

    1016

  2. B.

    1006

  3. C.

    610

  4. D.

    616

Attempted by 10 students.

Show answer & explanation

Correct answer: D

First, determine the width of the frame buffer. Since pixel locations range from 0 to 100 inclusive, the width is 100 - 0 + 1 = 101 pixels. In row-major order, the address of a pixel at (row, column) is calculated as (row × width) + column. For pixel location (6, 10), the row is 6 and the column is 10. Substituting these values: (6 × 101) + 10 = 606 + 10 = 616.

Explore the full course: Dsssb Tgt Computer Science Paper 2