Pointer and Array

Which of the following pointers can be used to manipulate the whole array My_Arr[x][y][z] of size x × y × z x \times y \times z ?

  1. A simple pointer

  2. A pointer to the simple pointer

  3. A pointer to the pointer to the simple pointer

1, 2 and 3 3 only 1 only 2 only

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Zeeshan Ali
Dec 22, 2015

You can use;

  • A simple pointer to manipulate a Linear Array
  • A pointer to the simple pointer to manipulate a 2D-Array
  • A pointer to the pointer to the simple pointer to manipulate a 3D-Array

Hence only the 3 r d \boxed{3^{rd}} given pointer can be used to manipulate My_Arr[x][y][z] .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...