r/C_Programming•
ptomen

Pointers and multidimensional arrays

Question

So I'm currently in the process of learning C, and I finally hit the arrays and pointers section.

If I understood things right, an array variable is a pointer that is "eventually" reduced to the reference of the first value. In that, the value of an N-dimensional array variable would be reduced to the reference of the first value of the first one-dimensional array.

I say reduced because, apparently an N-dimensional array is supposed to contain the reference of the (N-1)-dimensional array, however the result is (presumably) always the reference of the first element of the first one-dimensional array. If that's the case, why?

It seems like an array functions as a reductive overhead, or maybe I'm just complicating something simple.

Posted Oct 25, 2017, 9:22 PM UTC

110
Loading comments…