GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS
Go To First  |  Previous Question  |  Next Question 
 TCS  |  Question 12 of 23    Print  
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).
2. Find the value of @@+25-++@16, where @ denotes "square" and + denotes "square root".
3. A power unit is there by the bank of the river of 750 meters width. A cable is made from power unit to power a plant opposite to that of the river and 1500mts away from the power unit. The cost of the cable below water is Rs. 15/- per meter and cost of cable on the bank is Rs.12/- per meter. Find the total of laying the cab
4. In Madras, temperature at noon varies according to -t^2/2 + 8t + 3, where t is elapsed time. Find how much temperature more or less in 4pm to 9pm.
5. A Flight takes off at 2 A.M from northeast direction and travels for 11 hours to reach the destination which is in north west direction.Given the latitude and longitude of source and destination. Find the local time of destination when the
flight reaches there?
6. A 2D array is declared as A[9,7] and each element requires 2 byte.If A[ 1,1 ] is stored in 3000. Find the memory of A[8,5] ?
7. My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at a place with coordinates 36N70W. What is the local time when my plane landed.


  
Total Answers and Comments: 7 Last Update: March 01, 2007     Asked by: chinna 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Madhumitha
 
The answer to this Question is given wrongly.First think of a matrix like that. To move to (8,0) first we need to move 7*7 positionsie, 49*4 =196bytes need to be moved.Then the last 4 positions in order to get to the (8,5)positionie,4*4=16bytesThose two answes need to be addedie,196+16=3212bytesAns=3212

Above answer was rated as good by the following members:
rohan_garewal, mohd_shamim
December 30, 2006 20:37:18   #1  
siva_dvs Member Since: December 2006   Contribution: 2    

R 2: Find the value of @@+25-++@16, where @ denotes "square" and + denotes "square root".

given that

@ means square + means square root

then question is @@+25-++@16

first simplify @@+25

+25 5

*5 25

*25 625

i.e. @@+25 625

then ++@16

@16 256

+256 16

+16 4

therefore 625-4 621 is the answer


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
January 18, 2007 08:00:32   #2  
BHISMADEB Member Since: December 2006   Contribution: 4    

RE: 1. In a two-dimensional array, X (9, 7), with each...

1)answer will be 3160 because the adress of a[1][1] is 3000 so the adress of a[8][5] will be as like

3000+8*5*4 3160.

cause the distance of a[1][1] to a[8][5] is 40 and every block use 4 byte so it shud be 40*4 160


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    
January 28, 2007 07:34:15   #3  
Arnab Khawas        

..7. My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at
The diff in longitude between the two places is (10+70) 80deg.So the time diff bet two places 80*4 320min 5hr20 minthe time when it will reach will be (2a.m+10hr)-5hr20min 6:40a.maccording to the local time of the destination as it lies on the west side.
 
Is this answer useful? Yes | No
February 10, 2007 01:33:01   #4  
abhay vikram singh        

RE: 1. In a two-dimensional array, X (9, 7), with each...
hi i m abhay vikram singh from MIT (bishnupur).W.B. i have solved the above question the answers are as follows:

1: 3212

2: 621

3: 20250

4: 7.5 more

5: incomplete

6: 3106

7: 6:40am

 
Is this answer useful? Yes | No
February 14, 2007 00:22:48   #5  
mona        

RE: 1. In a two-dimensional array, X (9, 7), with each...
initial x (1 1) 3000 u hav to find from x(8 1)so u have x(1 1) x(1 2) ... x(7 7) so u have totally 7 * 7 49 elementsu need to find for x(8 5) ? here we have 5 elements each element have 4 bytes : (49 + 5 -1) * 4 212 -----( -1 is to deduct the 1 element ) 3000 + 212 3212
 
Is this answer useful? Yes | No
February 14, 2007 09:05:31   #6  
Madhumitha        

RE: 1. In a two-dimensional array, X (9, 7), with each...
The answer to this Question is given wrongly.First think of a matrix like that. To move to (8 0) first we need to move 7*7 positionsie 49*4 196bytes need to be moved.Then the last 4 positions in order to get to the (8 5)positionie 4*4 16bytesThose two answes need to be addedie 196+16 3212bytesAns 3212
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
March 01, 2007 05:24:45   #7  
pavan        

RE: 1. In a two-dimensional array, X (9, 7), with each...
I think the answer is 3212.
Because the total elements upto X(8 5) are 53.
So they occupy 4*53 212.
since the first element occupies 3000 the address of X(8 5) is 3212.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
Related Categories
Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape