Posted on :01-03-2016

**Q1. The sum of 7 consecutive numbers is 1617 then the number of prime numbers in it.**

**2**

__ANS:__**Q2. Find out next one. B A C B D C E D F ?**

**E**

__ANS:__**Q3. X is min of { n+5,6-n} then what is the min of X if,0 <1?**

**5.5**

__ANS:__**Q4. Which common no should be added or subtracted to 17/24 to make it 1/2.**

**-10**

__ANS:__**Q5. What two numbers have a product of 48 and, when the larger number is divided by the smaller, a quotient of 3?**

**4 and 12**

__ANS:__**Q6. A machine having 64 MB memory runs a executable which is 300 MB on disk. This is achieved by:**

A) Use of FAR pointersB) Page swapping.C) Save some variables on another machine on network.D) Cannot be run on the machine.

**B**

__ANS:__**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.

**A**

__ANS:__**Q8. Memory leak in software is due to**

A) Heavy recursion used in logic.B) Using structures of large sizeC) Improper use of the CPU registers.D) Improper release of allocated memory.

**d**

__ANS:__**Q9. Which of these items is not a form of IPC:**

A) Shared MemoryB) Pipes.C) Message queues.D) Semaphores

**B**

__ANS:__

__2 Coding Questions:__**1st:**

**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**

**00011000**

**01100001**

**01100001**

**00110011**

**00000111**

**10011000**

**10010011**

**10101010**

**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**