by =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= <toe@[EMAIL PROTECTED]
>
May 7, 2008 at 07:24 AM
On May 7, 3:12=A0pm, nembo kid <u...@[EMAIL PROTECTED]
> wrote:
> I have the following bidimensional array
>
> int a [100][100];
You're right that this is a bi-dimensional array, however the C
language sees it and treats it as an array of arrays. It's the same as
doing the following:
typedef int HundredInts[100];
HundredInts a[100];
> Why the first address of this array is only:
>
> & (mat[0][0])
>
> and not also:
>
> mat
You have an array consisting of 100 elements, each of which is a
"HundredInts". The first element of this array is a HundredInt. You
get the first element by doing the following:
a[0];
The type of a[0] is HundredInts, so a pointer to the first element is
going to be a "HundredInt *", or "int (*)[100]".
Basically it all boils down to the fact that a multi-dimensional
arrays is implemented as an array of arrays.