Questions in Adobe Tests n Interviews – Part 2

Questions in Adobe Tests n Interviews – Part 2

This is the continuation of the interview and test questions list that was started in the previous post for placement in Adobe  

———————————————-
1. avoid multiple inclusion of header file>
2. giv three examples of C preprocessors >
3. delete next node from linklist where next> node is not null>
4. if a is less than b is greater than c 70 % time how many times expression_E()> will be excuted if the following block of code is > executed 5000 times>> if(a else { if(b>c){ expression_E();}}>>
————————————————————————————-

1. what is sizeof() of following union>> union {> char * p;> int a; > float c;> } u;>> 
———————————————————————————

1. is thr any error printf(%d %d, a[1],2[a]);> 
—————————————————————————
1. find time complexity of following code;>> for(I to n)> {> J=n;> While(j){> J=j/2;> }> }>my written Qs:1. write the signature of sprintf();
2. what is the difference between typedef and # define
3. How does the call to free() know how many bytes to free 
4. write a generic swap macro which would swap int, float and pointers.
5. how is a[3][4][2] expanded
6. write c code to find the height of a binary tree.
7. what is the output ofprintf(“%d, %d”, n++, ++n); if n = 10 
8. write code to extract n bits from pth position from the end and these n bits should beat the right of the resulting number.
9. write a function to allocate memory for a 2D array.
10 how many swaps happen in bubble sort if the array is reverse sorted 
11. given a routine to calculate power recursively find how many multiplications are needed to calculate 5 pow 12
12 some qn on find what is concat(concat, head(tail(tail(S)))) where S is some set.
13 write algo to find if two rectangles intersect. 
14.write algo to print all paths from root to leaf in a tree
————————————————————————–
1. Explain your current project at MS
2. what is little endian and big endian and write code to find if a m/c is little endian
3. what is static variable in c and what is its scope and what is gloabal static
4. diff between structs and unions
5. ptr to a func which takes int, char and returns a char *
6. Given a complete binary tree with L leaf nodes find the total nodes and prove it
7. find min and max in an array of unsorted integers 
8. apples, oranges puzzle
9. fibonacci iterative/recursive
10. tell algo to create a heap from an unsorted array.
11. given two sets of 1 million entries each how would you find the intersection.
12. Given a very large file with over a million integers need to sort the file.
13. How would you find the shorted path to a friend in an orkut like structure.
14. What is the max VM size in 32 bit processors.
15 How comfortable are you in C++.
16 What is STL .
17 what are enumerators.
18 what are function pointers give an example where they can be used.
—————————————————————–
stay glued for more…..