Thursday, January 22, 2009

Adobe Interview of Sanyam Jain

Written exam

First paper consisted of a Quantitative and Logical Aptitude for duration of 45 minutes.
Second was of Engineering – 45 minutes
Third was C programming – 45 minutes

Ques 1.
Write setnum(x,p,y,n)
The LSD bits starting p from left in x are replaced with rightmost n bits in p.
Rest bits in x are unchanged.

Ques 2.
Write a program to find the depth of Binary Tree

Ques 3.
In Binary Search code, reduce the number of comparisons in while loop from two to one. Write the code.

Ques 4.
Difference between char arr[] = "string" and char *arr = "string".

Ques 5.
Points P1(x1,y1) and P2(x2,y2) are given. drawPoint(x,y) API is given. Write drawLine API taking P! and P2 as input and draw a line from P1 to P2.

Ques 6.
What are bit fields. Give example, when they are used.

Ques 7.
What are data break points. When do we use them.

Ques 8.
Write code to evaluate ReversePolish.
Input : 123+*
Output : 1*(2+3)

Ques 9.
Hex no. is given in string for (0x or 0X optional). Write code to get the integer value.

Ques 10.
Binary Search tree is given. Find the 4th smallest value node.

Ques 11.
Infix expression is given. Draw binary tree. Find postfix expression.

Ques 12.
Memory is maintained as stack type
Assembly Instructions are given :
Load : value
Store : value
Swap : top two values are swapped in memory
Add : top two values are added and replaced by sum
Diff : top value is subtracted from second top and replaced by difference
Label : define label
JMP : jump to label if true condition else give the top value

Write Instruction code for :

A = 300
for(i = 10; i> 0;i++)
A=A +200;

Ques 13.
Given computers C1 - Cn. Given k (L1 - Lk)direct links between computers. Links are transitive. Find whether all computers are connected.

Ques 14.
T1 : write to memory queue
T2 : read from memory queue and print

Create Event : event name
Enter Critical Section :
Exit Critical Section :
Wait Event :
Use instructions to wite code for two events with semaphore.

Ques 15.
Condition for stack are given in wrong order.
PUSH Stach[i] = A i = i - 1
POP i = i + 1 A = Stack[i]

Arrange in proper order

Ques 16
Implement int **my2DAllocate(int rows, int columns); to allocate memory for 2D array and return the int ** pointer.

Ques 17
Given a code in assembly language.. Find the output.



Interview Round 1

1. Introduce yourself. Discussion about the current project.
2. Allocate the memory to a 2D array. Free the allocated memory.
3. Puzzle : There are 100 floors and you have 3 eggs. You need to find the minimum floor from where the egg will break.
4. Puzzle 2 : Given 1000 bottles of wine. Out of these one is poisoned. You have n number of prisoners. Find the poisoned bottle by testing on the prisoners so that there is minimum death of prisoners.
5. Form mirror of a binary search tree.



Interview Round 2

1. Introduce yourself. Why do you want to join Adobe?
2. Static Linking and Dynamic Linking
3. Command to link a .so object.
4. Make file of your project
5. Process Vs Threads
6. Memory map of a process in execution
7. Java Script Vs C/C++
8. Implement strtok
9. String matching problem pseudo code
10. Difference between debugging mode binary and release mode binary.
11. What are stored procedures in Oracle?



Interview Round 3

1. Introduce yourself
2. Implement realloc. Please take care of the hypothetical situation that the memory allocated in realloc may overlap with the existing memory.
3. Puzzle : Given n numbers from1to n. One number is removed from these and a number is added. This leads to a duplicate in the list. You need to find out the duplicate and the original number
4. Puzzle : Given three boxes labeled Oranges, Mangoes and Oranges/Mangoes ,with the fruit they contain.. Now the labels are jumbled so that the if box is labeled Mango then it doesn’t contain mango. Correctly place the labels.
5. Question on object slicing and run time polymorphism in C++
6. Why do we pass the argument in copy constructor by reference?
7. Where do we require Copy constructor?
8. If we give only the parameterized constructor of a class. What will happen?
9. Difference between reference and pointer? In which scenarios we prefer pointers instead of reference.


Interview Round 4

1. Introduce yourself
2. Why do you want to leave Aricent?
3. Write the program to find that the two linked lists merge at a point or not
4. Write a program to print the given number in words. For example, print 1234 as one thousand two hundred thirty four.
5. Write a code to find reverse a stack without using a stack
6. What data structure will you use to store dictionary words. Implement is efficiently so that you can find the anagrams of a word easily.



Interview Round 5

1. Introduce yourself
2. Discussion about the current project.
3. What are exceptions in C++?
4. Implement a Date class. Provide an API to the user/some module so that they can call the get the current time ands date. The API should be such that the user cannot access/modify the date class.



Interview Round 6

1. Introduce yourself.
2. Why you want to leave Aricent and join Adobe?
3. Discussion of the current project.
4. What are the default functions provided for a class?
5. Implement an employee class. Store only the name and the employee id. Write the set of basic functions.
6. Discussion about the college project on website. How did you design the database? Discussion over the normalization.
7. Implement a Student class. Each student can issue a fixed number of books. Extend it so that information for a Phd student can also be stored. Phd student can have any number of books.
8. Under what scenarios we need to define a copy construtor?
9. Implement ftoi function. How does a program execution takes place? How will you specify some precondition for a function?



Interview Round 7

1. Introduce yourself.
2. Why do you want to leave Aricent.
3. You are given a sheet and a set of shapes. You have give a layout which will yield the maximum number of pieces (containing all shapes) that can be cut from the sheet.
4. How will you find out that a point lies outside / inside a polygon.
5. Write the prototype of the function sort.



Interview Round 8

1. Introduction
2. Why you want to leave Aricent?
3. Why Adobe should hire you?
4. 3 qualities.
5. Prove Pythagoras theorem
6. 75*85 = ?? without using any calculations on the board.

No comments:

Post a Comment