Computer Science · Programming Languages
A three-dimensional array in C++ is declared as int A[a][b][c]. Considering that the array elements are stored in row-major order and indexing begins from 0, the address of an item at location A[r][s][t] computed in terms of word length 'w' of an integer is:
- 1&A[0][0][0] + w(b * c * s + c * r + t)
- 2&A[0][0][0] + w(b * c * r + c * s + t)✓
- 3&A[0][0][0] + w(a * b * r + c * s + t)
- 4&A[0][0][0] + w(a * b * s + c * r + t)
Correct answer
&A[0][0][0] + w(b * c * r + c * s + t)
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Programming Languages?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Programming Languages