View Full Version : 2_D Arrays

10-20-2002, 10:12 AM

My query regards 2 D arrays. As we know a 1 D array ( say int k[7]; ) k points to the zeroth oth or the first element of the array.

When it comes to a 2 D array ( int k[7] [3] )..what is the exact role of k here? Need to complete my university assignment,,,any help would be great..

Josh Campbell
10-20-2002, 02:33 PM
If you have a multidimensional array (k) it is actually an array of arrays. (k) points to the address of the first element of the entire array (&k[0]). Since (k[0]) is itself an array, it points to the address of the first element contained inside it (&k[0][0]). Since both point to the same location it can be said that (k) and (k[0]) have the same value.

So k merely points to the first array, inside the array.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum