All mock tests are FREE till 31 December — register to save your progress

What would be the equivalent pointer expression for referring the array element ar[m][n][0]?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. *(*(*(ar + m) + n) + 0)

Explanation

a[i] is *(a + i). Applying this three times: ar[m] = *(ar + m), ar[m][n] = *(*(ar + m) + n), and ar[m][n][0] = *(*(*(ar + m) + n) + 0).

More Programming Languages and Computer Graphics questions