yo bhaiyya bingo....... u still remember this or are used to it....
btw frankly i dont think we need to learn any formula for this....
it is basically as easy as counting itself
Each element of array X [-15.....10, 15.......40] requires 2byte storage.
If da array is COLUMN MAJOR-WISE with beginning location 1500. Determine location of [5,20]
PL. reply fast!!!!!!
I m getting 1500 + 505*2
nebody's ans matching??
-
UP 0 DOWN 0 0 20
20 Answers
Jus confirmin :
Address of [ 6 ][ 8 ] is 4000 then find BASE address of [0][0] in a [20][ 10 ] array of byte size two
yes.. i din remember the formula.. but the concept.. so u see i did all the counting :P
KYA BLUNDER KIYA [2] [17]
par koi baat nahi IIT abhi baki hai mere dost [4] [6]
Address of [ 6 ][ 8 ] is 4000 then find BASE address of [0][0] in a [20][ 10 ] array of byte size two
[ 6][ 0] is 6 rows more hence 6x10 = 60
also [8 ] is 8 places from zero
so in all 68 steps back so
4000-136 = 3864
BRO :
Address = Base +{ row + column*(no. of rows)}*size
for column major.
yeh toh tum column major ka formula likh rahe ho
ya toh terminolgy mein dikkat hai.....
par anyways
ADD = 4000;
col = 8;
row = 6;
size = 2
yeh hi hona chahiye
0 - 8 ko 9 toh no of columns ke liye lete hain sirf...
kyonki 0,1,2,3,4,5,6,7,8 gin ke dekho [3] lekin col toh 8 hi hoga na
Address = Base +{ col + row*(no. of cols)}*size
ADD = 4000;
col = 8;
row = 6;
size = 2
I wrote this one ^^
????
OR IT SHUD b :
col = 9;
row =7???
Tapanmast, as ith_power pointed out, -15 to 10 are 26 numbers.
That is why I wrote 10+15+1 (= 26).
I think I'm correct, though I would like others to verify.
Wikipedia:
so i guess, i didn't understand the notation. what is the array exactly??
and p.s.= -15 to 10 are 26 numbers.
As far as I remember,
Address = Base +{ row + column*(no. of rows)}*size
for column major.
So, [5,20]= 1500+ (5+ (20)(10+15+1))*2
= 1500+525*2
how cum : "26x2"???
its 25 X 25 array wid elements startin frm -15 in da rows and +15 in the cols.