Paper was easy not that tough…I found database questions tough and unix also a little bit…as I don’t know unix that much J …though I was able to answer some of them….
Aptitude & Reasonning (Actually these were 2 diff sections, I have mixed up the questions J)
What is the product equal to:
12345679 * 18
Ans: 222222222
Suppose Zero is denoted as * and 1 is denoted as $
Also the value $ becomes double as it shifts 1 place to left. Like 4 = $**. Then,
How 418 will be written?
Ans: $$*$***$*
What is the average of 70, 170, 270??
Ans: 170 = $*$*$*$*
Two more questions on the same * and $. I don remember them.
(Note : In above, Actually they just wanted to check how to store numbers in binary and just changed 0’s to * and 1’s to $ to make the questions some typical. You just need to analyze that he is asking you binary numbers.)
In 100 Meter race A beats B by 10 meters. In another 200 meter race, B beats C by 10 meters. In a race of 200 meters, by how much A will beat C??
More than 20 meters
More than 10 but less than 20 meters
10 meters (Don’t remember the 3rd option exactly)
A can’t beat C
Data Suff. Quesitons were there like…
Mark 1 if a) alone can can ans the statement.
Mark 2 if b) alone can can ans the statement.
Mark 3 if both a) & b) are required to ans the statement.
Mark 4 if none of them can ans the statement.
What is Sachin’s score in 42nd inning??
a) Average of 1st 40 matches is 52.
b) Average is 50.
P,Q and R are three points. R is b/w P and Q and the distance between P and Q is 100 miles.
Find PR??
a) PR = x% of RQ
b) PR = 25% more than that of RQ
There were some more 2-3 questions on Data Suff. But I don’t remember them.
Condition Questions
There is a interview to be taken for a cook position in a hotel. The criteria is as
1 Candidate must have exp 3 years or above
2 Candidate must be age 25 or above
3 Candidate must be Medically fit.
4 Candidate must get 6 or more out of 10 in the written test.
And the condition was that if the candidate
i) misses exp 3 years creteria…he will be send to head cook for interview.
ii) misses age criteria…he will be send to manager for interview.
Now there were 4 different questions based on above information:
In 1st question, Criteria 1 was missed (that is of exp was missed) and he has got 8 out 10 in written.
In 2nd questions, Criteria 2 was missed (That is of age was missed) and he has got 6 out of 10 in written.
In 3rd question, Both were missed…its ans was Candidate will be rejected
In 4th, Both are met and He has got 9 out of 10 in written.
Again condition question:
There is one School which provides different facilities to its employees based on their working exp in school and the current position they hold. So you are required to recognize which facility is provided to which one. So, same as above just read all the conditions carefully and ans the questions. Believe me, it was damm easy Aptitute and Reasonning. Nothing that much tough I found.
One more conditional question was there.
So all the questions were easy. You were just required to read the question carefully. It was not that tough. Straight forward questions were there.
Number matching questions like
There were three questions and in each questions, three numbers were there….you are required to match if
all three or
1st two or
1st and 3rd are same.
For eg
254674984094784 254674984094784 254674984049784
In this 1st two are same.
So, you are just required to analyze the numbers carefully. Similarly there were two more questions with long decimal numbers.
Sets Based questions.
In a library 906 books are issued.
36 students got history and fiction books.
21 students got economics and fiction books.
27 students got history and economics books.
And 9 got all 3.
Now he asked Different questions like which have how much books.
Cube cutting and painting and question based on that like
How many cubes are painted 3 sides.
How many cubes are painted 2 sides.
How many cubes are painted none side.
How many cubes are painted 1 side only.
Java/J2EE
In Java, it was simple…not that tough…only core java…basic questions….
public class Outer
{
Class Inner{}
}
Which is invalid modifier for class Inner in above program?
Private
Public
Static
One more was there…don remem the 4th option
What is the output of below prog:
Class One
{
public void m1(int a)
{
a++; sysout(a);
}
Public void m2(int a)
{
--a;sysout(a);
}
}
Class Two
{
public void m1(int a)
{
--a;sysout(a);
}
}
Class main
{
psvm(String args[])
{
One o = new One();
Two t = new Two();
t.m1();
t.m2(); // This line was wrong…it must have to be o.m2()..Even I argued ther..
}
}
4 4
6 4
two more options…I dnt remember...
Following is a class Animal which has one method cat().
Class Animal()
{
Public void cat()
{
Sysout(“cat”);
}
}
Which of the following correctly overrides the cat method?
Public class Cat extends Animal
{
Public void cat()
{
Sysout(“cat”);
}
}
Public class Cat extend Animal
{
Public void cat()
{
Sysout(“cat”);
}
}
Public class Cat implements Animal
{
Public void cat()
{
Sysout(“cat”);
}
}
Public class Cat implement Animal
{
Public void cat()
{
Sysout(“cat”);
}
}
What is the purpose of Encapsulation??
Ans: It hides the implementation details from the user.(don’t remember the options)
What purpose does virtual functions serve?
Ans: used for the purpose of runtime polymorphism.
Questions on Garbage Collection
Questions on String immutability
Some other Output Questions
How to writes a string array to a file and create the file as well. Four progs were there…you were to identify the right prog. It was IO question but confusing one.
How to read the directory with all its subdirectories and files. Again Four progs were there…you were to identify the right prog.
What we can do File class?
Know parent directory.
Know the file contains text or binary data.
2 more options were there…don’t remember.
4 Prog were there…how to check mail every 3 seconds and update database every 6 seconds..you are asked to identify the correct prog. It was based on Multithreading.
Some other Multithreading questions..
What is the output of following program
class ABC implements Runnable
{
public void run()
{
System.out.println("run");
}
}
class Main
{
public static void main(String args[])
{
ABC abc = new ABC();
abc.run();
abc.run();
abc.start();
}
}
Run
Run run
Run run run
Run run run run
Which exception is thrown in the following program:
Class A
{
Psvm(String args[])
{
B b = newB();
}
}
Class B
{
Public B()
{
Throw exceptionb ;
}
}
I marked the ans as exceptionb
What would happen if we don’t initialize a variable
Compile may report error if we try to use it in a method before initializing. (I marked this as my answer)
The value of all references types is null
The value of string type is “”
One more option was there…I don’t remember…
SQL and Databases(I found it tough…and dnt remember much questions from this section J)
Which of the following executes both the insert and update command simultaneously in Oracle?
Upsert
Merge
Indate
Inerge
Which of the following is the correct code to query an access database using openrowset?
Which of the following Union command retains the duplicate data?
Union All
Union
Union None
Union dupl
Unix(was not that tough…just basic command)
Which of the following is a parser for getting command line options/arguments?
Getarg
Getopt
Option
Choice
Which of the following is a suitable way to unzip the file *****.dmp.gz?
Unzip
Gzip
Zcat
Gunzip
What is the purpose of chgrp command in Solaris?
Which is used to go the last of the word in vi editor?
W
L
E
F
How will find unix in UNIXDIRECTORY which has lost of files..its was using grep command something…
Which is correct regarding absolute path..
Absolute path always starts from root (I marked this as right ans)
$HOME/usr is an absolute path
Two more options…I don’t remember…
IF you have any querries in any questions…Feel free to ask me @ mukeshkmrgarg@gmail.com
Enjoy…..
Date: 12th April, 2010
Place: @ My Home enjoying the life… J
(Mukesh Kumar)