>Is it right?? In theory. In practice it's more like this:
*( *( baseAddress + N ) + M )
Why? Because a two dimensional array isn't required to be strictly contiguous in memory. Pick any teacher and they'll tell you that the storage for a two dimensional array is just a one dimensional array that uses special subscripting rules like the one you posted. And that's true, to a point. The elements of an array are required to be contiguous, but at the boundaries of a one dimensional array, all bets are off.
It's because of this boundary rule that you can't portably treat a multidimensional array as a single dimensional array and use a mathematical formula to index it. So while the N*C+M example helps one to understand how multidimensional arrays work, it's not something you should be using in your code.
>Other thing, is it deferent if the array is lower or upper triangular, or >the same way by substituting missing elements by zeros?? An array is an array. How you use the indices to represent your data doesn't change that.