Flipkart Placement Paper February 2012

Posted on :01-03-2016
Q1. The sum of 7 consecutive numbers is 1617 then the number of prime numbers in it.
ANS: 2
Q2. Find out next one. B A C B D C E D F ?
Q3. X is min of { n+5,6-n} then what is the min of X if,0 <1?
ANS: 5.5
Q4. Which common no should be added or subtracted to 17/24 to make it 1/2.
ANS: -10
Q5. What two numbers have a product of 48 and, when the larger number is divided by the smaller, a quotient of 3?
ANS: 4 and 12
Q6. A machine having 64 MB memory runs a executable which is 300 MB on disk. This is achieved by:
A) Use of FAR pointers
B) Page swapping.
C) Save some variables on another machine on network.
D) Cannot be run on the machine.
Q7. Which of the following is true about thread and process startup speed:
A) The startup of a thread is faster than a process.
B) The process startup is faster as it is directly controlled by the OS.
C) They will be equal.
D) Depends on OS that is used. Faster on Windows 98 slower on NT.
Q8. Memory leak in software is due to
A) Heavy recursion used in logic.
B) Using structures of large size
C) Improper use of the CPU registers.
D) Improper release of allocated memory.
ANS: d
Q9. Which of these items is not a form of IPC:
A) Shared Memory
B) Pipes.
C) Message queues.
D) Semaphores
2 Coding Questions:
Say there is a string. If there is an occurrence of a hexadecimal number after a $ sign. Say we have $0020. Then we should print character corresponding to that ascii value. If it is not a hexadecimal then directly print. Eg $123 then print $123.
Main example: sita$0020and$0020gita have books
Output: sita and gita have books
Eg: sita and $123 gita are friends Output: sita and $123 gita are friends
2nd: Suppose we have 8* 8 matrix. Each cell has either 0 or 1. You would be given a location and you have to find all ones which lie on same island. Points lie in same island if one point is in any of the adjacent cells
For location 3rd location*2 location: = eight
3 How would you implement the “ls” in Java. It should take the input:
>ls a/b/c/./e/../f/./../g/./../h
and the output should be similar the the output given by unix