Type : Fresher, Job Interview
Exam/Interview Date : 06-Sep-2010
No of Rounds : Technical Round-1, Technical Round-2

Two Rounds: Not tough Question.But time management required.

Engineering Round: (15 question)

1 Finding height of binary tree

2. Number of times multiplication is required:
int computeXn(int x int n)
{
if(n%2=0)
{
return x*x;
}
else if(n%2=0)
{
int y computeXn(x n/2);
return y*y;
}
else if(n%2=1)
{
int y computeXn(x n/2);
return y*y*x;
}
}
Calculating power of a tree for 5^12.

3. Polynomial A+Bx+Cx^2+….+Nx^(n-1) this representation is more suitable for which data structure. Then P and Q are two such polynomial and how to add that two using that data structure. WAP for that.

4. Specification of variables in one language: letter follow by letter or digit.
Options:
1. (LUD)*
2. L.(LUD)* => this one right.
3. L.(L.D)+
4. L.(L.D)*

5. How Generic Swap of two elements can be implemented? that supports all type line int char float double etc..

6. Two rectangle is given with following data structure
rectangle {
int left_X;
int Left_X;
int right_X;
int Right_Y;
}
Two are in X-axis wise. How to find that they are intersected or not? WAP for that…

7. Free( P) How it decide how much space should be freed in c?

i. aaac
ii. abbc
iii. accc
iv. abdc

C Round: (10 question)

1. Diff between typedef and #define?

2. getbis function gives n bits from the position p of an binary no A.

3. You have to sort large data. But your memory does not have so much space. how you can sort that.

4. a pointer representation

5. You have two threads T1 and T2 they are reader and writer respectively.
With some specification:
PROCESS.SET
PROCESS.RESET
ENTER CS
EXIT CS
LOOP
EXIT LOOP
WAIT# PROCESS

6. sprintf() function used how and what means?

7. An array given Arr[] which is in decreasing order. How many swapping required in
for (int index=0;index
{
for(int j=n-index;j
{
if(a[j]>a[j+1])
{
swap(a[j],a[j+1]);
}
}
}

8. Finding Output:
int arr[]={10,20,30,40}
int varible_ptr=arr;
for(int index=0;index<4;index++) { printf(” arr[%d] = %d”, index, *(varible_ptr+index)); varible_ptr+=sizeof(int); } Ans: output: arr=10 arr=30…