Mentor Placement Paper : Technical - Other IT-BHU - 9 August
MENTOR PAPER ON 9th AUGUST
C/C++
1) what will be the out put of program..
main()
{char *s[]={,asdasd,,,asdfgf,,,fgjhgj,,,tyuuuy,,,dsfgfds,,,dfdsgf,};
char **p;
p=
for(int i=0;i<(sizeof(s)/sizeof(char *));i++)
printf("%u",++*s);
printf("%u",*++s);
}
2) what the program do...
vob (int a ,int b)
{
a=a^b;
b=a^b;
a=a^b;
}
ficssa(int a[], int n)
{
for(int i=0;i
}
}
}
3) write a algorithm to shift a array k bits cyclically.
4)write a algorithm of a function wich takes input of three parameter int number,int Index and bool value.Now we hv to replace the index,th position by bool value(0/1) in number and return the new No.
5)write a efficient an fast algorithm to find out the pair in 1,2,3,........100 no who,s sum is 100.
6) single link list operations.......deleting node..etc.
Hardware section.....
I don,nt remember much..just read thoroughly computer Architecture deeply..
Aptitude section...
1) A bad king is thr..and a queen of another kingdom wants to kill him..she send a killer..King likes wine very much he has 1000 bottle of wine..the killer mix up th posion in one of the bottle..now the bad king got knew it..so he took 10 prisoners ..the posion get effect in one month..and u hv to fined out the way to decide which bottle content posion..and u hv 7 week to do so..
2) ther a re two bottles of 10 litre each filled with water. now two persons having bottles of 4 litre and 5 litres want to take 2-2 litres of water from the prev botles..now u hv to pour the water without wasting or throwing it.
3) two frds meet after 20 yrs..
fisrt: i hv three daughter multiplication of thier age is 72,
second i don,nt get.
first: The oldest one start playing piano just..
second i don,nt get..
second : my oldest one is also os same age..
tell the ages of daughters..
4)......
rest i don,t remeber..
Mentor Placement Paper : Mentor Paper Candidates Experiences
Company : Mentor Graphics
D |---------|Q, D|-------|
-----| |------------| |--------Q
| | | |
clk--|--|> |--- |---|> |--------
| | --------| | |--------|
| |
|-------|>------------|
(based on this figure 2 questions)
1. positive or negative triggering?
2. Delay of first filp flop is d1 and delay of second flipflop is d2. What is satup and read out times
3. what is the representation in -2 box for 3 and -3 ? only 0 an 1 are allowed.
4. An 8 bit full adder is constructed by
(i) by using Halfadder(conventional)
(ii) 2 4 bit carry lookhead adder
If delay fo Half adder is 1 Unit. what is the delay in the above two cases.
5. Side of regular hexagon is 1cm. What is its area?
6. S->AX/y
A->X/Ay
B->X/y find S value( I think this from compiler design)
7. a=a^b
b=a^b
a=a^b find values of a,b? (^ exclusive or)
8. In this question Inorder and Preorder is given. Question is to find Postorder.
9. count=0;
for(i=1;i<=n;i++)
{
i=(i)&(i-1);
count++;
}
return count;
--------
i=21,22 same count. For what other values of i we get same count?
10. A matrix A[i][j] is given. If we want to add the elements of the matrix which method is better? why
1) column wise 2) row wise
11. The tridiognal matrix is represented in linked list form. To retrive the matrix in tridiognal from what method is used?
( four options were given)
1) 2) 3) 4)
12. Which Data structres is used for DFS?
13. If number of nodes =n. What is the min and max levels.
14. 1,3 1,4 5,7 1,3
-- --- --- ---
Total No. of slots =4. After 4 slots what are free remaining pages?
15. for n
f(n)
while(n)
if(n<=2)
return 1
else return f(n-1)*f(n-2)
Find order of f(n).
16. Bubble sort complexity is greater than quick srot.
(TRUE OR FALSE questions.)
17. Two binary numbers a and b its one,s complement are
for a=0100
for b=1001
What is the decimal addition of a&b.