| implementation of address | |
|
|
Author | Message |
---|
kool Active member
| Subject: implementation of address Thu Mar 18, 2010 4:18 pm | |
| Can anyone help me solve this question:::::
Each element of an array arr[15][20] requires 'W' bytes of storage.If the address of arr[6][8] is4580 and the base address at arr[1][1] is 4000,find the width 'W' of each cell in the array arr[][] when the array is stored as Column major wise. |
|
| |
G-7 Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 4:42 pm | |
| i get the answer as 5 |
|
| |
kool Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 4:42 pm | |
| bt how plz can u explain.......... |
|
| |
G-7 Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 4:44 pm | |
| btw is that answer correct..?? i am not sure if its correct.. as i cannot recollect any variable type having 5 bytes
do u have the anser.? |
|
| |
kool Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 4:45 pm | |
| no actually it is from isc specimen paper.. it dont hv answers |
|
| |
G-7 Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 4:51 pm | |
| anyway i did it using the formula: Address [i][j] = B + w[r(j-Lc)+(i-Lr)]
[i][j] --> address of element to be found r --> num of rows Uc-Lc+1 Uc --- upper column limit (here Lc---lowr column limit (here 1)
Ur---upper row lim (here 6) Lr---lower row limit (here 1)
B---base address
w --- the space req of the array type (here to be found)
anyone else plz post answers too. Btw what did u gt.? |
|
| |
kool Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 5:00 pm | |
| what have u taken as no of rows??????? (r) |
|
| |
G-7 Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 5:02 pm | |
| r --> num of rows Uc-Lc+1 |
|
| |
kool Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 5:06 pm | |
| no i want to ask the value that u hv taken in this question |
|
| |
G-7 Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 5:07 pm | |
| 15..?? |
|
| |
kool Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 6:50 pm | |
| plz someone help!!!!!!!!!! |
|
| |
Uber Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 9:32 pm | |
| yup...the answer is 5... |
|
| |
G-7 Active member
| Subject: Re: implementation of address Thu Mar 18, 2010 10:00 pm | |
| but wait UberSoldat, can u think of any data type which has the capacity 5..? Int is 4, char is 1 float and double are greater than 5..! I doubt if there is some technical problem in the question..... |
|
| |
Sponsored content
| Subject: Re: implementation of address | |
|
|
|
| |
| implementation of address | |
|