Aspire Faculty ID #14531 · Topic: UGC NET Computer Science 26 June 2025 (Paper II) · Just now
UGC NET Computer Science 26 June 2025 (Paper II)

What would be the equivalent pointer expression for referring the array element ar[m][n][o]?
  1. *(*(*(ar) + m + n) + o)
  2. (*(*(*(ar + m) + n) + o))
  3. (*(*(ar + m) + n) + o)
  4. *(*(*(ar + m) + n) + o)

Solution

Consider ar as a 3-dimensional array declared as:

data_type ar[a][b][c];

Here, the array element ar[m][n][o] can be represented in pointer form as:

*(*(*(ar + m) + n) + o)

Step-by-step understanding:

  • ar is a pointer to the first 2D array ar[0].
  • ar + m moves the pointer to the mth 2D array → ar[m].
  • *(ar + m) gives the address of the first 1D array inside ar[m].
  • *(ar + m) + n moves to the nth 1D array → ar[m][n].
  • *(*(ar + m) + n) gives the address of the first element of that 1D array.
  • *(*(*(ar + m) + n) + o) finally gives the element ar[m][n][o].

✅ Final Answer: *(*(*(ar + m) + n) + o)

Previous 10 Questions — UGC NET Computer Science 26 June 2025 (Paper II)

Nearest first

Next 10 Questions — UGC NET Computer Science 26 June 2025 (Paper II)

Ascending by ID
1
Which of the following is not a valid property over two fuzzy relations $\tilde R$ and $\tilde S$ for performing $\lamb…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
2
Which of the following belongs to McCall’s Quality Factors? A. Maintainability B. Usability C. Integrity…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
3
Match List I with List II List I List II A. Count to infinity problem I. Mobile Adhoc Networ…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
4
Match List I with List II List I List II A. Digital Signature I. Asymmetric encryption algor…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
5
Arrange the following parsers in increasing order of their power (least → most): LR(0) LR(1) LALR(1) LL(0) S…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
6
Maintaining a graph in memory by means of its adjacency matrix is known as
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
7
Consider the following interrupt protection levels in Linux, and arrange them in the increasing order of their prioriti…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
8
Consider relation R(A, B, C, D, E) with the following functional dependencies: C → F, E → A, EC → D, A → B. Wh…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
9
Which of the following trees are height balanced? A. Binary Search Tree B. AVL Tree C. Red-Black Tree D…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
10
Let P denote “She is intelligent” and Q denote “She is happy.” Given statements: (a) If she is intelligent, the…
Topic: UGC NET Computer Science 26 June 2025 (Paper II)
Ask Your Question or Put Your Review.

loading...