# Adobe Technical Test paper 2012

Written Test :-

1) Wap to reverse a linked list and sort the same.

2) Given two integers A & B. Determine how many bits required to convert
A to B. Write a function int BitSwapReqd(int A, int B);

3) Write an algorithm to insert a node into sorted linked list. After inserting, the list must be sorted.

4) Without using /,% and * operators. write a function to divide a number by 3. itoa() function is available.

5) Wap to swap two integer pointers.

6) Write a funcn int round (float x) to round off a floating point num to int.

7) write an ALP to find sum of First n natural numbers using the following Instructions

LDA num   ; load Accumulator with num
DCR R     ; decrement Register R INR R     ; increment Register R
MOV x,y  ; move the contents of register y into register x
DJNZ label; Decrement & Jump if A <> 0
you can use B & C registers in addition to A register

8) Prove that a tree is BST. What is height of a tree?

9)  Given A, B & C Boolean polynomials. Prove That (A+BC) = (A+B) (A+C) Set 2
1. Binary search Tree was given. Find 4ths smallest element.
2. Some code in assembly was given and given five options. What is being calculated? Ans (XY) 2 + Y + Z
3. Represent (-5)10 in 2’s complement representation in 8 bits

4. Expression was given. Draw tree and then find the postfix

Some commands in the assembly language were given. Then need to convert this code in assembly

A=300;
For (i=0 ; i<=10 ; i++)
A=A+200;