News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

GEODESIC PAPER ON 3RD JULY,2008

Started by ganeshbala, Mar 21, 2009, 09:36 PM

Previous topic - Next topic

ganeshbala

GEODESIC PAPER ON 3RD JULY,2008

WRITTEN TEST:
Unlike other companys Geodesic had a very different written pattern. There were 2 Sections,
1) Algorithms and Logical Thinking
2) C Questions

1) Algorithms and Logical Thinking:
There were three questions in this sections.Each carries 5 marks. Ur Solution to the problem must be an optimal one.

q1) There was a plane which should satisfy the condt 0<b<a. U have to write a function f(x,y) which computes xn = (x + y)/2 and yn = 2(xy/x+y).Caluclate it for first 3 values and find an invariant for these values??

q2) There are 'm' rows and 'n' columns, these have choclates in it. 2 users play a game in turn,If player breaks a chocolate in a cell,he can go either row wise or column wise and the next player should play his turn.The one who is finally left with one square is the loser.If player1 doesnt break a small chocolate and gives his turn for player2,what is the optimal stragedy for winning? What are the positions of losing??

q3) There were 'n' people seated in a circle,every second person in the circle is eliminated,again the circle is enclosed and the procedure is repeated.Describe this as a function and 'n' should be decipted as a binary number.U should corelate n with f(n).Find f(10) and f(20)?
(Hint: This problem is a variant of jospheus problem)
2) C Questions-Here there were 7 questions which were splitted as 1,2 and 3 mark problems!!
q1) A Train is of length 'n' meters which has individual compartments of size 1 or 2 meters in length. In how many possible ways that the length of the train is accommodated with 1 or 2m compartments. Write a function Train(n) which computes this? (3m)

q2) Give the Structure definition of link list and how will u detect a loop in the link list? Write a Seperate function for that? (3m)

q3) Perform addition of two numbers without using '+' operator? (2m)

q4) Consider the code snippet,
int n[] = {0014,010,2,4,8,12};
int i;
for(i=0;i<6;i++)
{
printf("%d",n);
}
What is the output of the above program? (2m)
q5) Find the output of the following program,
#define swap(x,y) x=x+y;y=x-y;x=x-y;
void main()
{
int x=5,y=10;
swap(x,y);
printf("%d %d",x,y);
swap1(x,y)
printf("%d %d",x,y);
}
int swap1(int x,int y);
{
int temp;
temp =x;
x=y;
y=temp;
return 0;
} (2m)

q6) Consider the following code snippet,
void main()
{
char s=127;
unsigned char u;
s++;
}
(a) is s > 127?
(b) is s < u? (1m)

q7) Write a function which compares two strings ending with a null character which returns '0' when they are same and '-1' when they are not same? U should not use strcmp() function. (2m)

ganeshbala

GEODESIC PAPER ON 25TH JULY,2008

There are 3 sections in Aptitude :
1) Coding (Multiple Choice) 15 Questions 15 Marks
2) Algorithmic Thinking 2 Questions 15 Marks
(No multiple Choice)
3) Numerical Thinking 6 Questions 15 Marks

1) Coding
It is Multiple Choice section containing 15 questions for 1 mark each.
Most of the Questions were from Linked List, Malloc, realloc , and what will be the o/p kind
and Find the error .
There is No Negative marking .Non - IT can also solve the questions Just read Balagurusamy for C.
2) Algorithmic Thinking
There were 2 questions. one for 10 marks and other for 5 marks.

1)You r given 100 names in sorted manner. U have to search for name (n) and display its number from [100].
Sequential/ Linear search method will not yield any marks. [10M]

(I just wrote the name of method as Indexed Search and for the method I got 3 marks.
But everybody wrote about Binary Search)

2) There are 2 frogs at d end of aflight of 10 stairs. they can come up by jumping either 1 step or 2 or 3 steps. So they can come up by (3,3,3,1) or (2,3,1,3,1) . In this way write C function for in general n stairs (not just 10) and find in how many ways they can come up. Also (3,3,3,1) is different from (1,3,3,3) .(Try programs like this)

3) Numerical
It Contains 6 questions all easy.
1), 2), 3) Based on Knapsack Method for 9 marks.

4) Find the last digit of 3 ^ 1857 [1M]
Ans: 3^1856 * 3 = 3^1857 and for 1856 last digit is 1 and it is multiplied by 3 . So last digit is 3.
(If u find 3^4, 3^8, 3^ 12, u will find that for a number divisible by 4 last digit is 1 and 1856 is divisible by 4.)

5) there are 3 lines of infinite extents are give . How many largest regions can be formed using these 3 lines. [2m]
Ans : 7 (Make a cross using 2 and 3rd from anywhere intersecting other 2 at different points)

6) there are 9 pearls given of which 1 is heavier . Using weight scale find the odd one in at most 2 scalings. [3M]
Ans : Divide 9 into 3 groups of 3 pearls each. Weigh any two first . If any one is heavier then take that group of 3 and out of which weigh 2 pearls. If they r equal 3rd one is heavier or if one is heavier then it is heavier.