Adobe Paper 2011
Adobe Paper 2011
Adobe Paper 2011
Give two scenarios where we make the use of this 2. What do you mean by Bit fields? Give example 3. Write the function for changing a number from hexadecimal to integer htoi(s 4. Compare two binary trees they are same or not. 5. You have N computers and [Ca, Cb] means a is connected to b and this connectivity is symmetric and transitive. then write a program which checks that all computers are interconnected and talk two each other 6. WAP to find Depth of tree program. We were given the structure of the node using that we need to write the code. 7. In binary search we have two comparisons one for greater than and other for less than the mid value. Optimize so that we need to check only once 8. Some code in assembly was given and given five options. What is being calculated? Ans (XY) 2 + Y + Z 9. Represent (-5)10 in 2s complement representation in 8 bits 11. Expression was given. Draw tree and then find the postfix 12. What is the output of the program void main() { char s[]="oracle is the best"; char t[40]; char *ss,*tt; while(*tt++=*ss++); printf("%s",t); getch(); } // A. oracle is the best // B. Core dump // c. Error Message // D. Goes into infinite loop Ans: B. core dump (Garbage value)
13. What is the output of the program void main() { int j[10]={9,7,5,3,1,2,4,6,9};
int i=1; clrscr(); for(;i<9;i++) printf("%d ",--j[i++]); getch(); } // A. 6,2,1,5 // B. 6,2,1,5,7 // c. Error Message // D. core dump Ans: A. 6,2,1,5 14. which is the best data structure to check correct paranthesization of an expression ?? give reasons ? 15. in one line tell the maximum of 3 nos using tertiary operator(?:) 16. tell diff a) void (*P)(void *a[],int n); b) void *(*p[])(void *a,int n); 17. a question was there in which #defeine sum(a,b) (a*b) #define mult(a,b) (a)+(b) 18. What is the difference between Char a[ ]=string and char *a=String 19. difference between #define and typedef? 20. Expand a[3][2][5]=6;