Sei sulla pagina 1di 3

Adobe placement paper(Written test) it was a 3 hr written test comprising 2 tech rounds(C/C++, Engineering,related to algorithms) , a quant paper, and

an aptitude test. YOU CAN ALSO EDIT/POST THE ANSWERS OR YOUR EXPERIENCES IF YOU WANT BUT PLEASE PUT THE EXPERIENCE AT THE END OF THE DOC. ADD ANSWERS BELOW THE QUESTION ONLY. C/C++ 1. void main() { char ch1[]=hello,ch2[]=hello; if(ch1==ch2)print(equal); else print(unequal); } predict the output Ans: unequal

2.

char *p1=the world is; char *p2=the worlds is beautiful; p1=p2; p2=beautiful; print(p1); print(p2);

Ans: beautiful beautiful (wrong answer) correct is: the world is beautifulbeautiful(p2=beautiful changes value of the address to which p2 is pointing). 3. WAP to find whether an arithmetic expression is delimited by proper braces. (matching braces). 4. char ch[16]=the world is; ch[13]=b; print(ch); Ans: the world is 5. An array A is given with starting address 5000 . int A[]={1,2,3,4,5}; print(A+1,&A+1); Ans: 5000 5020

6. question on union

7. question related to function ptr. 8. char * ch1[]={abcd,efgh,ijkl,mnop}; char** ch2[]={ch1,ch1+1,ch1+2,ch1+3}; char***ch3; ch3=ch2; print(*(*ch3)); 9. 10. questions related to pointers, union, array , strings where there.

PLEASE PUT IN IF YOU CAN RECALL ANY OF THE QUESTIONS. Engineering 1. An instruction code of 1 byte(known as bytecode) in JVM is used by a machine. How many (instructions/bytecode) are possible? 2. Multiply 2 no. a and b without the use of * operator recursively. It should not do more no. of additions than the smaller no. 3. Two sets A and B are given. Find two no. a and b from A and B respectively such that a+b=val, where val is another input. 4. Check whether a no. is palindrome or not, without converting it to a string or array of any type 5. Reverse a singly linked list. 6. A NxN matrix is given containing only 1s and 0s. Every row is sorted in descending order. Find the row containing maximum no. of ones. 7. Numbers ending in 3 have at least one multiple having all ones. for eg., 3 and 13 have a multiples like 111 and 111111 respectively. Given such a no. , find the smallest such multiple of that number. The multiple can exceed the range of int, long. You cannot use any complex data structure. 8. Four processes of 1gb,1.2gb,2gb,2gb are there and RAM available is 2gb. We have a time shared system. Which of the following is the most appropriate scheduling algorithm? a. all processes are loaded sequentially 1 by 1 b. load one process at a time and execute processes in RR fashion c. load 1gb, 1,2gb first then processes 3 and 4 follow d. All processes can be loaded together and CPU time shared among them 9. if (lock)wait else lock=1 CS

lock=0 a. No issues b. works only for uniprocessor systems c. data insufficient d. wont work on any system

Potrebbero piacerti anche