1. Analytical questions: 15Q-15mins
2. Quantitative: 30Q-30mins
3. Technical 1:10Q-45mins
4. Technical 2:10Q-45mins

Analytical I find some time taking. Quantitative was damn easy.

Technical Question
1. Format of sprintf()
2. difference between #define and typedef?
3. How does free() function work ?
4. Expand a=6;
5. *foo(int rows, int columns) – asked to allocate a memory dynamically for a 2-Dimensional array and return that pointer from function foo?
6. Asked to write a function getsbits() such that for an integer, display ‘n’ number of bits from position p (assume bit 0 starts from right end)?
7. Int main()
{
int a={10,23,24,65};
int *prt=a;
int index
for(index=0;index<4;index++) { printf(“%d”,*prt); Ptr+=sizeof(int); } }

8. Find the depth of a binary tree?

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

Technical Question

1. 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.

2. Find the path from root to all the leaf nodes?

3. How do you sort a huge data such that all of the data at a time cant fit into the main memory? Write the pseudo code for it?

4. One question on FA was given…. Damn easy

5. 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.

6. 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)*

7. 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…

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

9. You have two threads T1 and T2 they are reader and writer respectively. Implement the reader, writer problem using the following functions? With some specification:
PROCESS.SET
PROCESS.RESET
ENTER CS
EXIT CS
LOOP
EXIT LOOP
WAIT# PROCESS

Wish U All the Best!