A three dimensional array in 'C' is declared as int A[x][y][z]. Consider that…

PYQ TCS NQT 2024

A three dimensional array in 'C' is declared as int A[x][y][z]. Consider that array elements are stored in row major order and indexing begins from 0. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer):

  1. A.

    &A[0][0][0] + w(y * z * q + z * p + r)

  2. B.

    &A[0][0][0] + w(y * z * p + z*q + r)

  3. C.

    &A[0][0][0] + w(x * y * p + z * q+ r)

  4. D.

    &A[0][0][0] + w(x * y * q + z * p + r)

Attempted by 199 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…