DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   two dimensional array (http://www.daniweb.com/forums/thread54259.html)

muhammad amir Sep 5th, 2006 8:32 am
two dimensional array
 
hi,
in my last lecture i had faced a quiz, it was related to two dimensional array.i was unable to solve it.the question is
"you are required to find a generic formula of the two dimensional array that how memory is being allocated for two dimensional array ?how compiler know that it has to skip certain column or how new array is start ?we also that memory is linear
please consign me website related to two dimensional array
thank you

Ancient Dragon Sep 5th, 2006 10:15 am
Re: two dimensional array
 
Here is one

jotsaroop Oct 3rd, 2007 2:28 pm
Re: two dimensional array
 
Quote:

Originally Posted by muhammad amir (Post 249509)
hi,
in my last lecture i had faced a quiz, it was related to two dimensional array.i was unable to solve it.the question is
"you are required to find a generic formula of the two dimensional array that how memory is being allocated for two dimensional array ?how compiler know that it has to skip certain column or how new array is start ?we also that memory is linear
please consign me website related to two dimensional array
thank you


hi!!!! nice to know ur question
the basic funda behind that is two demensional array is stored in memory rowwise ie.
eg 1 2
3 4
this metrix will store in memory as location 2000 1
2001 2
2002 3
2003 4
so there is no question of skipping any thing


if not understood arguments will be appreciated
thanks


All times are GMT -4. The time now is 8:31 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC