1. In a two dimensional array X(9,7) with each element occupying 4 bytes of memory with the address of the first element x(1,1) is 3000,find the address of X(8,5) ? Ans is 3212 but how explain2.194 base 10= ___ base 53.the base 5 representation of the decimal number 2048 is______4.when 3/4 of a units digit is added to ten's digit of a two number,the sum of the digit becomes 10.If 1/4 of the ten's digit added to the unit's digit then the sum of the digits is 1 less than the previous.Find the number a)94 b)84 c)48 d)88

This question is related to TCS Interview

Questions by DeviRavikumar   answers by DeviRavikumar

Showing Answers 1 - 27 of 27 Answers

ans.   X(1,1)=3000 (given)

Each element occupies 4 bytes of memory so

           X(1,2)=3004

           .

           .

            X(1,7)=3042

             X(2,1)=3046

              .

               X(2,7)=3052

                X(3,1)=3056

................X(3,7)=3080

             X(4,1)=3084

   .........X(4,7)=3108

             X(5,1)=3112

.............X(5,7)=3136

              X(6,1)=3140

...............X(6,7)=3164

                X(7,1)=3168

.................X(7,7)=3192

                  x(8,1)=3196

...................X(8,5)=3212-----------ans 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

shanthi

  • Oct 6th, 2006
 

hi .could u explain clearly how to solve this question.u gave as formula like

3000+(7*7+5-1)*4       in this  wht represent wht .frm where 7 u got & 5 .please explain it .

Amyt

  • May 21st, 2007
 

<base-addr> + <element-size>[max.cols*(x-1)+(y-1)]
here base-addr =3000
elt size = 4
max-cols  =7  --> 9x7
x=8
y=5
==>
3000 + 4[7*(8-1)+(5-1)] =3212

farzad_af

  • Apr 3rd, 2009
 

4) Just solve the following simultaneous equations:

if the number we are after was XY, then:

3/4(Y)+X=10
Y+1/4(Y)=10-1

X=4, Y=8

  Was this answer useful?  Yes

Formula:
Base address+byte required{N(i-1)+(j-1)}
Here Base addres is 3000.
          Byte required is 4.
          N=Number of columns in an array.
           i=row of the array element of the address to be found.
           j=column of the array element of the address to be found.
Solution;
         3000+4{7(7)+4}=3212.

  Was this answer useful?  Yes

brahmam

  • Oct 21st, 2014
 

3012

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions