# Geodesic Written test

Posted on :09-03-2016
WRITTEN TEST:

I) Algorithms and Logical Thinking:

Q1) There was a plane which should satisfy the condt 0

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 player 2,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)?

II) C Questions:

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[i]);
}
What is the output of the above program?

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;
}

Q6) Consider the following code snippet,

void main()
{
char s=127;
unsigned char u;
s++;
}

(a) is s > 127?
(b) is s < u?

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)

## Geodesic Placement Papers

➤ Geodesic Model Placement Paper

FreshersLive - No.1 Job site in India. Here you can find latest 2020 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

 ✖