Cadence Placement Paper (Aptitude & Technical)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Paper: Cadence Placement Paper (Aptitude & Technical)

1. Inorder and preorder trees (expressions) are given and postorder tree (expression) is to be
found out.

2. int v,u;

while(v != 0)

t = v % u;

v = u;

u = t;

find the time complexity of the above program.

3. x is passed by reference, y passed by value.

x = 3, y = 2;

foo(x, y)

var integer x, y;

x = x + 2;

y = y + 3;

main()

x = 5;

y = 5;

foo(x, y);
print (x, y);

output of the above pseudo code.

4. given a grammar, in which some productions of if then else etc were given. you had to choose
one option that can be derived out of the grammar.

5. how many flip flops you require for modulo 19 counter.

6. ring counter's initial state is 01000. after how many clock cylces will it return to the initial
state.

7. some boolesn expression of the form x'y'z' + yz + .. ( something like this) find the simplified
expression

8. given 6 bit mantissa in 2s complement form and 4 bit exponent is in excess-4 form in a
floating point representation, find the number

ans -(something) * ( 2 to the power 3)

9. A signed no is stored in 10-bit register, what is the max and min possible value of the number.

10. A room is 30 X 12 X 12. a spider is on the middle of the smaller wall, 1 feet from the top,
and a fly is ont he middle of the opposite wall 1 feet from the bottom. what is the min distance
required for the spider to crawl to the fly.

11. A man while going down in a escalator (which is moving down) takes 50 steps to reach down
and while going up takes 125 steps. If he goes 5 times faster upwards than downwards. What
will be the total no of steps if the escalator weren't moving.

12. 2/3 of corckery(plates) are broken, 1/2 have someother thing(handle) broken , 1/4 are both
broken and handle broken. Ultimately only 2 pieces of crockery were without any defect. How
many crockery were there in total.

13. __________________________________________________
___|___ ___|___ ___|___ |
|||||||
| |__ | |___ | |___ |
|_______| | |_______| |__not_ |_______| | |
||||
|____________________|_____________|____and_|___

boxes are negative edge triggered flip flops and 'not' and 'and' are gates. What is this figure.
ans- modulo-5

14. It is difficult to draw a figure but another question was in which some NAND and OR gates
were given.

ans - Z = true.

C & UNIX

1. What does chmod 654 stand for.

2. Which of following is used for back-up files?


(a) compress (b) Tar (c) make (d) all the above Ans : b

3. what does find command do ? Ans : search a file

4. what does " calloc" do?


Ans : A memory allocation and initializing to zero.

5. what does exit() do?


Ans : come out of executing programme.

6. what is the value of 'i'?


i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")
Ans : 1

7. i=2
printf("%old %old %old %old ",i, i++,i--,i++);

8. Using pointer, changing A to B and B to A is Swapping the function using two address and
one temporary variable. a,b are address, t is temporary variable. How function look like?
Ans : swap(int *, int *, int )

9. In 'o' how are the arguments passed?


ans : by value.

10. Find the prototype of sine function.


Ans : extern double sin(double)

11. Scope of a global variable which is declared as static?


ans : File

12. ASCII problem


i=..
ans : 6
13. what is the o/p
printf(" Hello \o is the world ");
Ans : Hello is the world.

14. Clarifying the concept addresses used over array ; ie changing the address of a base element
produces what error?

15. child process -- fork


child shell -- sh

16. Answer are lex 7 yacc & man read these things in UNIX

17. What is int *p(char (*s)[])


Ans : p is a function which is returning a pointer to integer which takes arguments as pointer to
array of characters

1. A sequence is given. You should find out error & write correct 1 2 5 10 13 26 29 48.

ans: Error is 48,there you should write 58.

2. 2,3 6,7 14,15 29,46. Error is 46. In every pair you add 1 to get second number. Ans:29+1=30

3. A girl is 13'th highest,13th lowest. How many member.

Ans:25

4 .Rearrange MERGANY

Ans: GERMANY (country)

5. Rearrange BBIRAT

Ans:RABBIT

6. there are 6 persons k,l,m,n,o,p to give seminar cond: 3 persons should give before lunch and 3
after lunch l should immediately precede the seminar of m there should be no gap between l and
m .....

ans: 1. L position is 2
2 m pos is 5
3. k pos is 4

7. A is daughter of Y, Z is father of Y. Q is son of Z,


1.if T is son of Y, then
ans: T and A brother/sister
2. if m is brother of T, then
ans :Z is grandfather of M and M & A are brother/sister
3. if Q is son of Z them
ans: Q & Y are brothers
Q. if speed of ongoing train is 24 and while return is 48
avg = ----

ans:32

8. 0.23 + 0.02323 + 0.002323.... == ???

9. 0.4 + 0.44 + 0.444 ..... = ???

10. 1,2,2,4,8,?

ans:32

11. 55*55*55+45*45*45/55*55-55*45+45*45

ans:100

12. 4^^61 + 4^^62 + 4^^63 + 4^^64 . this sum is divisible by which of the following ?

ans:17

1. A sequence is given. You should find out error & write correct 1 2 5 10 13 26 29 48.

Ans : Error is 48,there you should write 58.

2. 2,3 6,7 14,15 29,46. Error is 46. In every pair you add 1 to get second number. 

Ans : 29+1=30

3. A girl is 13'th highest,13th lowest. How many member.

Ans : 25

4 .Rearrange MERGANY
Ans : GERMANY (country)

5. Rearrange BBIRAT

Ans : RABBIT

6. (passage)
there are 6 persons k,l,m,n,o,p to give seminar 
cond: 3 persons should give before lunch and 3 after lunch
l should immediately precede the seminar of m
there should be no gap between l and m .....

Ans : 1. L position is 2
           2 m pos is 5
           3. k pos is 4

7. (passage)
A is daughter of Y, Z is father of Y. Q is son of Z,

1.if T is son of Y, then

Ans : T and A brother/sister

2. if m is brother of T, then

Ans : Z is grandfather of M and M & A are brother/sister

3. if Q is son of Z them

Ans : Q & Y are brothers


Q. if speed of ongoing train is 24 and while return is 48 avg = ----

Ans : 32

8. 0.23 + 0.02323 + 0.002323.... == ???

9. 0.4 + 0.44 + 0.444 ..... = ???

10.1,2,2,4,8,?

Ans : 32

11. 55*55*55+45*45*45/55*55-55*45+45*45

Ans : 100

12. 4^^61 + 4^^62 + 4^^63 + 4^^64 . this sum is divisible by which of the following ?

Ans : 17

You might also like