URGENT ANS NEEDED b4 12 : 30pm

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??

20 Answers

21
tapanmast Vora ·

Jus confirmin :

Address of [ 6 ][ 8 ] is 4000 then find BASE address of [0][0] in a [20][ 10 ] array of byte size two

62
Lokesh Verma ·

yes.. i din remember the formula.. but the concept.. so u see i did all the counting :P

21
tapanmast Vora ·

KYA BLUNDER KIYA [2] [17]

par koi baat nahi IIT abhi baki hai mere dost [4] [6]

1
Philip Calvert ·

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

11
Mani Pal Singh ·

yeh kya ho raha hai?????[2][17]

62
Lokesh Verma ·

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

21
tapanmast Vora ·

BRO :

Address = Base +{ row + column*(no. of rows)}*size
for column major.

1
Philip Calvert ·

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

21
tapanmast Vora ·


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???

1
Philip Calvert ·

-136 karna tha

1
ith_power ·

If the array is 26 X 2, how do you find a location 5,20?

21
tapanmast Vora ·

K KK.... THNX GUYZ!!!!

1
metal ·

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.

21
tapanmast Vora ·

oh yah....

BUT THIS IS ALL THE BOARD QUESTN OF 2008 READS

1
ith_power ·

Wikipedia:

so i guess, i didn't understand the notation. what is the array exactly??
and p.s.= -15 to 10 are 26 numbers.

21
tapanmast Vora ·

dude, i myself dont know the ans. [7]

21
tapanmast Vora ·

Oh metal is dat 1 (10+15+1) for considering "0"th row?

1
metal ·

Am I correct?

1
metal ·

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

21
tapanmast Vora ·

how cum : "26x2"???

its 25 X 25 array wid elements startin frm -15 in da rows and +15 in the cols.

Your Answer

Close [X]