You are on page 1of 84

Infosys Placement paper

Please note some of the key points here, example- Founder, CEO, Tag line and specially some good
points about company. They may ask you in the interview "Why Infosys?".

Infosys Written Test : 95 minutes; 65 Questions

This written test is divided into 3 sections. The important topics for each of these sections is given as
follows:

Quant: permutations & combinations, number series, crypto math's, analytical puzzles, alligations and
mixtures, probability etc.

Reasoning: data sufficiency, data (pie / bar / tables / chart), syllogisms, blood relations, statement
reasoning etc.

Verbal: one long RC, one short RC, basic grammar, such as : fill in the blanks, antonyms + synonyms,
sentence correction, theme detection etc.

After this, it was the time for the online test.

Just 2 rounds were there:

1. Aptitude ( Reasoning + Quantitative + Verbal Ability ).

2. Personal Interview (Technical + HR).

In Reasoning, there were 15 questions. You really need to brush up your skills in topics like Data
interpretation , data sufficiency, syllogism and number series to clear this section. Level of questions-not
very easy, not too difficult. Just relax your mind and start solving. Indiabix would be enough. Time limit
for this section was 25 minutes. But believe me, time constraint is not going to create any problem in
this section.
Regarding aptitude, there will be 10 questions. 5 questions will be easy, you will hardly take 10 min to
solve those 5. But the rest 5 are going to create little problem. Those will be little complex and you really
need to have some good approach to solve them. You are definitely not going to face much problems if
you have solved these chapters multiple times from R.S Aggarwal-Permutations and combinations,
probability, Numbers, Profit-loss, Time-distance . Well, this is the best book you can find in market. 1 or
2 complex problems from cryptarithmetic will be there, just google it now, it is really an easy one. Time
limit for this section-35 min.

Coming to verbal ability, here they are not only checking your knowledge in English but your patience as
well. This section is going to be little tough as compared to the above two. You really need to have a
good knowledge of Basic English grammar that you have studied in your school days, because at present
it would be difficult for you to pick up "Wren-n-Martin" and start studying tense, voice, narration
etc.(You may try if you have time and patience.) In this section you will get 40 questions which include 2
paragraphs, sentence correction, spotting errors, jumbled sentences based on basic grammar. No
synonyms and antonyms were asked. Indiabix will be good for practice. Time limit for this section-35
min

***************************************

INFOSYS PLACEMENT PAPERS -

INTERVIEW QUESTIONS:

1. Nine individuals - Z, Y, X, W, V, U, T, S and R - are the only

candidates, who can serve on three committees-- A, B and C,

and each candidate should serve on exactly one of the

committees.

committee: A should consist of exactly one member more than

committee B. It is possible that there are no members of

committee C.

Among Z, Y and X none can serve on committee A.

Among W, V and U none can serve on committee G.

Among T, S and R none can serve on committee C.

In case T and Z are the individuals serving on committee B,

how many of the nine individuals should serve on committee C?


A.3 B.4 C.5 D.6 E.7

Answer: B

2. Of the nine individuals, the largest number that can serve

together on committee C is

A.9 B.8 C.7 D.6 E.5

Answer: D

3. In case R is the only individual serving on committee B,

which among the following should serve on committee A?

A.V and U B.V and T C.U and S D.T and S

Answer: D

4. In case any of the nine individuals serves on committee C,

which among the following should be the candidate to serve on

committee A?

A.Z B.Y C.W D.T

Answer: C

5. In case T, S and X are the only individuals serving on

committee B, the members of committee C should be:

A.Z and Y B.Z and W C.Y and V D.Y and U

Answer: A

6. If SAVOURY is coded as OVUARSY then how will RADIATE be

coded?

A.AIDARET B.IDARA TE C.ARIADTE D.IDAATRE

Answer: D

7. If MAPLE is coded as VOKZN then how will CAMEL be coded?

A.OVNZF B.OUNZX C.OVNZX D.XZNVO


Answer: C

8. If CRY is coded as MRYC then how will GET be coded?

A.MTEG B.MGET C.MEGT D.METG

Answer: D

9. If Sand is coded as Brick, Brick as House, House as Temple,

Temple as Palace then where do you worship?

A.Palace B.Temple C.Brick D.House

Answer: A

10. If BURNER is coded as CASOIS then how will ALIMENT be

coded?

A.BKJLFMU B.EKOLIMS C.EMONIOU D.BRJSFTU

Answer: C

11. How many such letter-pairs are there in the word SERVANT

having the same no. of letters left between them in the word as

they have in the series?

A.2 B.3 C.4 D.5

Answer: A

12. How many such letter-pairs are there in the word MONKEY

having same no. of letters left between them as they have in

the series?

A.3 B.4 C.1 D.5

Answer: C

13. How many such letter-pairs are there in the word

SMUGGLER having same no. of letters left between them as

they have in the series?


A.2 B.3 C.4 D.1

Answer: A

14. How many such letter-pairs are there in the word

BONAFIDE having same number of letters left between them as

they have in the series?

A.2 B.3 C.4 D.1 E.None of these

Answer: E

15. How many such letter-pairs are there in the word

FRONTIER having same no. of letters left between them as they

have in the series?

A.2 B.4 C.1 D.3

Answer: A

16. Statements :

Some soldiers are famous

Some soldiers are intelligent

Conclusions :

I. Some soldiers are either famous or intelligent

II. Some soldiers are neither famous nor intelligent

A.if only conclusion I follows B.if only conclusion II

follows C.if either I or II follows D.if neither I or II follows

Answer: D

17. Statements :

All boys are honest

Sachin is honest

Conclusions :
I. Sachin is a boy

II. All honest persons are boys

A.if only conclusion I follows B.if only conclusion II

follows C.if either I or II follows D.if neither I or II follows

Answer: D

18. Statements :

Some nurses are nuns

Madhu is a nun

Conclusions :

I. Some nuns are nurses

II. Some nurses are not nuns

A.if only conclusion I follows B.if only conclusion II

follows C.if either I or II follows D.if neither I or II follows

Answer: D

19. Statements :

All windows are doors

No door is wall

Conclusions :

I. No window is wall

II. No wall is door

A.if only conclusion I follows B.if only conclusion II

follows C.if either I or II follows D.if neither I or II follows

Answer: A

20. Statements :

All poles are guns


Some boats are not poles

Conclusions :

I. All guns are boats

II. Some boats are not guns

A.if only conclusion I follows B.if only conclusion II

follows C.if either I or II follows D.if neither I or II follows

Answer: D

21. In a certain code language ”˜pik da pa’ means ”˜where are

you’; ”˜da na ja’ means ”˜you may come’ and ”˜na ka sa’

means ”˜he may go’, which of the following means ”˜come’ in

that code language ?

A.da B.ja C.na D.none of these

Answer: B

22. Father of Nation Mahatma Gandhi died on 30th January

1948. What was the day on which he died?

A.Tuesday B.wednessday C.Thursday D.Friday

Answer: D

Explanation:

Up to 1600 AD we have 0 odd days, up to 1900 AD we have 1 odd

day. Now for in 47 years we have 11 leap years and 36 normal years.

Odd days from 1901 to 1947 = 11 x 2 +36 x1 = 22 + 36 =58 odd

days = 8 weeks + 2 odd days Total odd days up to 31st December

1947 = 1 + 2 = 3 odd days 30 days of January

contain only 4 weeks + 2 odd days So 30th January 1948 has

total 5 odd days Day on 30th January 1948 = Friday.


23. What should come next in the following number series ?

9898798769876598765498765

A.3 B.4 C.2 D.1

Answer: B

24. Meeta correctly remembers that her father’s birthday is

after 8th July but before 12th July. Her brother correctly

remembers that their father’s birthday is after 10th July but

before 15th July. On which day of July was definitely their

father’s birthday ?

A.10th B.11th C.10th or 11th D.Cannot be

determined

Answer: B

25. Four of the following five are alike in a certain way and so

form a group. Which is the one that does not belong to that

group ? (a) Radish (b) Orange (c) Pear (d) Mango

A.Radish B.Orange C.Pear D.Mango E.apple

Answer: A

26. There are 6 boys Amit, Banhid, Dhruv, Chand, Harsh and

Gaurav. They want to go out with 6 girls - Nidhi, Parul, Kruti,

Naseem, Sujata and Radhika, not necessarily in the same

order. The pairs want to visit movie, beach, park and play; and

two of them want to go to circus. They like different

eatables; pavbhaji, chaat, bhel and pani-puri. Pavbhaji and

chaat are each preferred by two pairs. Following information is

given:
- Amit and Chand visit circus, but don't like pav-bhaji or panipuri.

- Gaurav can't go with Sujata and Parul, as both of them don't

like chaat, but Gaurav does.

- Naseem and Kruti want to go to movie and park

respectively.

- Dhruv goes with Radhika to beach, but does not chaat or

pani-puri.

- Banhid goes to a movie and eats pav-bhaji. Radhika does

not like bhel.

- Harsh cannot go with Nidhi or Parul and he does not go to

a park.

If Amit goes with Nidhi, then who goes with Chand

A.Parul B.Naseem C.Kruti D.none of these

Answer: A

27. Who among the following visits the park?

A.Harsh B.Banhid C.Gaurav D.Dhruv

Answer: C

28. Who must go to a play?

A.Nidhi B.Sujata C.Parul D.Kruti

Answer: B

29. Dhruv must eat

A.Chaat B.Pav-bhaji C.Pani-puri D.none of these

Answer: B

30. Kruti must eat

A.Pani-puri B.Chaat C.Bhel D.Pav-bhaji


Answer: B

1. What is the 8th term in the series 1, 4, 9, 18, 35, 68, . . .

Sol:

1, 4, 9, 18, 35, 68, . . .

The pattern is

1 = 21 – 1

4 = 22 – 0

9 = 23 + 1

18 = 24 + 2

35 = 25 + 3

68 = 26 + 4

So 8th term is 28 + 6 = 262

2. USA + USSR = PEACE ; P + E + A + C + E = ?

Sol: 3 Digit number + 4 digit number = 5 digit number. So P is 1 and U is 9, E is 0.


Now S repeated three times, A repeated 2 times. Just give values for S. We can easily get the following table.

USA = 932

USSR = 9338

PEACE = 10270

P + E + A + C + E = 1 + 0 + 2 + 7 + 0 = 10
3. In a cycle race there are 5 persons named as J, K, L, M, N participated for 5 positions so that in how
many number of ways can M make always before N?

Sol:

Say M came first. The remaining 4 positions can be filled in 4! = 24 ways.

Now M came in second. N can finish the race in 3rd, 4th or 5th position. So total ways are 3 x 3! = 18.

M came in third. N can finish the race in 2 positions. 2 x 3! = 12.

M came in second. N can finish in only one way. 1 x 3! = 6

Total ways are 24 + 18 + 12 + 6 = 60.

Shortcut:

Total ways of finishing the race = 5! = 120. Of which, M comes before N in half of the races, N comes
before M in half of the races. So 120 / 2 = 60.

4. If POINT + ZERO = ENERGY, then E + N + E + R + G + Y = ?

Sol:

4 digit number + 5 digit number = 6 digit number. So E = 1, P = 9, N = 0

Observe R + 0 = G. But R = G not possible. 1 + R = G possible. So R and G are consecutive. G > R.

1 + I = R, So I and R are consecutive. R > I. i.e., G > R > I. and G, R, I are consecutive. Now O + T should
give carry over and O + Z also give carry over. So O is bigger number. Now take values for G, R, I as 8, 7,
6 or 7, 6, 5 etc. and do trial and error.

POINT = 98504, ZERO = 3168 and ENERGY = 101672.


So E + N + E + R + G + Y = 1 + 0 + 1 + 6 + 7 +2 = 17

5. There are 1000 junior and 800 senior students in a class. And there are 60 sibling pairs where each
pair has 1 junior and 1 senior.1 student is chosen from senior and 1 from junior randomly.What is the
probability that the two selected students are from a sibling pair?

Sol:

Junior student = 1000

Senior student = 800

60 sibling pair = 2 x 60 = 120 student

Probability that 1 student chosen from senior = 800

Probability that 1 student chosen from junior = 1000

Therefore,1 student chosen from senior and 1 student chosen from junior

n(s) = 800 x 1000 = 800000

Two selected student are from a sibling pair

n(E) = 120C2 = 7140

Therefore

P(E) = n(E)/n(S) = 7140⁄800000

6. SEND + MORE = MONEY. Then what is the value of M + O + N + E + Y ?

Sol:

Observe the diagram. M = 1. S + 1 = a two digit number. So S = 1 and O cannot be 1 but 0. Also E and N
are consecutive. Do trial and error.

SEND = 9567, MORE = 1085, MONEY = 10652

SO M + O + N + E + Y = 1 + 0 + 6 + 5 + 2 = 14
7. A person went to shop and asked for change for 1.15 paise. But he said that he could not only give
change for one rupee but also for 50p, 25p, 10p and 5p. What were the coins he had ?

Sol:

50 p : 1 coin, 25 p : 2 coins, 10 p: 1 coin, 5 p : 1 coin, Total: 1.15 p

8. 1, 1, 2, 3, 6, 7, 10, 11, ?

Sol:

The given pattern is (Prime number - consecutive numbers starting with 1).

1=2–1

1=3–2

2=5–3

3=7–4

6 = 11 – 5

7 = 13 – 6

10 = 17 – 7

11 = 19 – 8

14 = 23 – 9

1. A Lorry starts from Banglore to Mysore At 6.00 a.m, 7.00 a.m, 8.00 a.m.....10 p.m. Similarly another
Lorry on another side starts from Mysore to Banglore at 6.00 a.m, 7.00 a.m, 8.00 a.m.....10.00 p.m. A
Lorry takes 9 hours to travel from Banglore to Mysore and vice versa.

(I) A Lorry which has started At 6.00 a.m will cross how many Lorries.

(II) A Lorry which has started At 6.00 p.m will cross how many Lorries.
Sol:

I. The Lorry reaches Mysore by 3 PM so it meets all the Lorries which starts after 6 a.m and before 3 p.m.
So 9 lorries. Also the Lorry which starts at night 10 p.m on the previous day at Mysore reaches
Bangalore in morning 7 a.m. So it also meets that Lorry. So the Lorry which starts at 6:00 am will cross
10 Lorries.

II. The lorry which has started at 6 p.m reaches destination by 3 a.m. Lorries which start at the opposite
destination at 10 am reaches its destination at 7 pm. So all the lorries which starts at 10 am to 10 pm
meets this lorry . So in total 13.

2. GOOD is coded as 164 then BAD coded as 21.if ugly coded as 260 then JUMP?

Sol:

Coding = Sum of position of alphabets x Number of letters in the given word

GOOD = (7 + 15 + 15 + 4 ) x 4 = 164

BAD = (2 + 1 + 4) x 3 = 21

UGLY = (21 + 7 + 12 + 25) x 4 = 260

So, JUMP = (10 + 21 + 13 + 16) x 4 = 240

3. If Ever + Since = Darwin then D + a + r + w + i + n is ?

Sol: Tough one as it has 10 variables in total. 4 digit number + 5 digit number = 6 digit number. So left
most digit in the answer be 1. and S = 9, a = 0. Now we have to use trial and error method.

Here E appeared 3 times, I, R, N two times each. Now E + I or E + I + 1 is a two digit number with carry
over. What could be the value of E and I here. 8 and 7 are possible. But from the second column, 8 + C
= 7 or 17 not possible. Similarly with 7 and 6. If E = 5, then the remaining value can be filled like above.
5653 + 97825 = 103478

Answer is 23

4. There are 16 hockey teams. find :

(1) Number of matches played when each team plays with each other twice.

(2) Number of matches played when each team plays each other once.

(3) Number of matches when knockout of 16 team is to be played

Sol:

1. Number of ways that each team played once with other team =

16

16C2. To play with each team twice = 16 x 15 = 240

2.

16

16C2 = 120

3. Total 4 rounds will be played. Total number of matches required = 8 + 4 + 2 + 1 = 15

5. 15 tennis players take part in a tournament. Every player plays twice with each of his opponents. How
many games are to be played?
A. 190

B. 200

C. 210

D. 220

E. 225

Sol:

Formula:

15

15C2 x 2. So 15 x (15 - 1) = 15 x 14 = 210

6. 1, 11, 21, 1211, 111221, 312211, . . . . . what is the next term in the series?

Sol:

We can understand it by writing in words

One

One time 1 that is = 11

Then two times 1 that is = 21

Then one time 2 and one time 1 that is = 1211

Then one time one, one time two and two time 1 that is = 111221

And last term is three time 1, two time 2, and one time 1 that is = 312211

So our next term will be one time 3 one time 1 two time 2 and two time 1

13112221 and so on

7. How many five digit numbers are there such that two left most digits are even and remaining are
odd.
Sol:

N = 4 x 5 x 5 x 5 x 5 = 2375

Where

4 cases of first digit {2,4,6,8}

5 cases of second digit {0,2,4,6,8}

5 cases of third digit {1,3,5,7,9}

5 cases of fourth digit {1,3,5,7,9}

5 cases of fifth digit {1,3,5,7,9}

8. 13_46_8_180_210_75 = 64 . Use + and – in the empty places to make the equation holds good. Take
m = number of + and n = number of – . Find m – n?

Sol:

13 – 46 – 8 – 180 + 210 + 75 = 64

m=3

n=4

m–n=–1

10. If a refrigerator contains 12 cans such that 7 blue cans and 5 red cans. In how many ways can we
remove 8 cans so that atleast 1 blue can and 1 red can remains in the refrigerator.

Sol:

Possible ways of keeping atleast 1 blue and 1 red ball are drawing cans like (6,2) (5,3) (4,4)

(6,2)

C
6

7C6×5C2

⇒ 710 = 70

(5,3)

7C5×5C3

⇒ 21 x 10 = 210

(4,4)

C
4

7C4×5C4

⇒ 35 x 5 = 175

70 + 210 + 175 = 455

11. Find the 8th term in series?

2, 2, 12, 12, 30, 30, - - - - -

Sol:

11 + 1 = 2

22 – 2 = 2

32 + 3 = 12

42 – 4 = 12
5

52 + 5 = 30

62 – 6 = 30

So 7th term = (

72 + 7) = 56 and 8th term = ({

82} – 8) = 56

Answer is 56

12. Find the next three terms of the series;

1, 4, 9, 18, 35 - - - - -

Sol:

21 – 1 = 1

22 + 0 = 4

2
3

23 + 1 = 9

24 + 2 = 18

25 + 3 = 35

So

26 + 4 = 68,

27 + 5 = 133,

28 +6 = 262

Answer is 68, 133, 262

13. Rahul took a part in cycling game where 1/5 ahead of him and 5/6 behind him then total number of
participants =

Sol:

Let x be the total number of participants including Rahul.

Excluding rahul = (x – 1)

1
5

15(x–1)+56(x–1) = x

31x – 31 = 30x

Total number of participants x = 31

14. Data sufficiency question:

What are the speeds two trains travels with 80 yards and 85 yards long respectively? (Assume that
former is faster than later)

a) they take 75 seconds to pass each other in opposite direction.

b) they take 37.5 seconds to pass each other in same direction

Sol:

Let the speeds be x and y

When moves in same direction the relative speed,


x–y=

85

80

37.5

(85–80)37.5 = 0.13 - - - - - (I)

When moves in opposite direction the relative speed, x + y = 165/75 = 2.2 - - - - (II)

Now, equation I + equation II gives, 2x = 0.13 + 2.2 = 2.33

⇒ x = 1.165

From equation l, x – y = 0.13

⇒ y = 1.165 – 0.13 = 1.035

Therefore the speeds are 1.165 yards/sec and 1.035 yards/sec.

15. Reversing the digits of father's age we get son's age. One year ago father was twice in age of that of
his son? find their current ages?

Sol:

Let father's age = 10x + y

Son's age = 10y + x (As, it is got by reversing digits of fathers age)

At that point

(10x + y) – 1 = 2{(10y + x) – 1}

⇒ x = (19y – 1)/8
Let y = 3 then x = 7.

For any other y value, x value combined with y value doesn't give a realistic age (like father's age 120
etc)

So, this has to be solution.Hence father's age = 73.

Son's age = 37.

1. X Z Y + X Y Z = Y Z X.

Find the three digits

Sol:

2nd column, Z + Y = Z shows a carry so, Z + Y + 1 = 10 + Z

⇒ Y=9

1st column, X + X + 1 = 9

⇒ X = 4 so, Z = 5

459 + 495 = 954

X = 4, Y = 9, Z = 5

2. In a 5 digit number, 3 pairs of sum is 11 each.last digit is 3 times first one,3rd digit is 3 less than 2nd,
4th digit is 4 more than the second one. Find the number.

Sol:

1st Digit

⇒a

2nd Digit

⇒b

3rd Digit

⇒ (b – 3)

4th digit

⇒ (b + 4)

5th Digit

⇒ 3a

So the number is : (a)(b)(b – 3)(b + 4)(3a)

Now, Let's analyze 1st and the 5th digit :

Possible combinations -

1-3

2-6

3-9

(Since 4 will yield 12 which is obviously more than 2 digits)

Now Let's analyze 2nd,3rd and 4th Digits :

Possible Values of 2nd Digit i.e 'b' is :

5,4,3

As, (b – 3) > 0 i.e 3rd Digit and (b + 4) 1 + 3 + 7 = 11

Similarly, 24186 for 4 – 1 – 8 and 6 + 4 + 1 = 11


3rd Combination 5 – 2 – 9 will get no possible match.

Hence, 2 solutions : 13073 and 24186

If Repetitions not allowed then Ans should be 24186

3. GOOD is coded as 164 then BAD as 21. If UGLY coded as 260 then JUMP?

Sol:

G O O D = 7 + 15 + 15 + 4 = 41

41 x 4 = 164

Similarly

BAD=2+1+4=7

7x3

U G L Y = 21 + 7 + 12 + 25 = 65

65 x 4

Similarly,

J U M P = 10 + 21 + 13 + 16 = 60

60 x 4 = 240

4. Supposing a clock takes 7 seconds to strike 7. How long will it take to strike 10?

Sol:

7 strike of a clock have 6 intervals

While 10 strikes have 9 intervals.


Required time = (

76×9) seconds =10 1/2 seconds.

Because time is only moving ahead ! so when we say between 1 to 2 hours, that means we assume only
1 hours not 2 hours.

5. An escalator is descending at constant speed. A walks down and takes 50 steps to reach the bottom. B
runs down and takes 90 steps in the same time as A takes 10 steps. How many steps are visible when
the escalator is not operating?

Sol:

Lets suppose that A walks down 1 step / min and

escalator moves n steps/ min

It is given that A takes 50 steps to reach the bottom

In the same time escalator would have covered 50n steps

So total steps on escalator is 50 + 50n.

Again it is given that B takes 90 steps to reach the bottom and time

taken by him for this is equal to time taken by A to cover 10 steps i.e

10 minutes. So in this 10 min escalator would have covered 10n steps.

So total steps on escalatro is 90 + 10n

Again equating 50 + 50n = 90 + 10n we get n = 1

Hence total number of steps on escalator is 100.


6. Albert and Fernandes have two leg swimming race. Both start from opposite ends of the pool. On the
first leg, the boys pass each other at 18 m from the deep end of the pool. During the second leg they
pass at 10 m from the shallow end of the pool. Both go at constant speed but one of them is faster. Each
boy rests for 4 seconds at the end of the first leg. What is the length of the pool?

Sol:

The solution is :Let the length of swimming pool be : D

let their speed be x and y. So according to question the fast swimmer (let x) would start from shallow
end.

Thus

Let they first meet after time:

t1

18

x×t1=D–18 (1)

=
18

y×t1=18 (2)

(2) / (1)we get

18

18

yx=18(D–18) --- (3)

Let t2 be the time after which they meet 2nd time (the 4 sec delay is cancelled as both wait for 4 sec)

So

10

x×t2=2D–10 ---- (4)


(as x travelled one length complete to deep end + length from deep end to 10 m before shallow end)

10

4y×t2=D+10 ----- (5)

(as y travelled one length complete to shallow end + 10 m from shallow end)

(5) / (4)we get

10


10

yx=(D+10)(2D–10) ----- (6)

from (3) and (6)

18

18

10

10

18(D–18)=(D+10)(2D–10)

solving we get

D x (D – 44) = 0
Since D cannot be zero

So D = 44 m answer.

7. 16, 36, 100, 324, _ ?

Find the next term.

Sol:

This sequence can be written as a sequence of squares of numbers as...

42,

62,

10

102,

18

182

The differences between the successive numbers are in geometric progression

which is of

2,4,8,?

21,
2

22,

23,

24

The next number =

18

16

(18+16)2 = 1156

8. How many ways can one arrange the word EDUCATION such that relative positions of vowels and
consonants remains same?

Sol:

The word EDUCATION is a 9 letter word with none of letters repeating

The vowels occupy 3,5,7th & 8th position in the word & remaining five positions are occupied by
consonants

As the relative position of the vowels & consonants in any arrangement should remain the same as in
the word EDUCATION

The four vowels can be arranged in 3rd,5th,7th & 8th position in 4! ways.
similarly the five consonants can be arranged in 1st ,2nd ,4th, 6th & 9th position in 5! ways

Hence the total number of ways =

120

24

2880

5!×4!=120×24=2880

9. There are 8 digits and 5 alphabets.In how many ways can you form an alphanumeric word using 3
digits and 2 alphabets?

Sol:

Select 3 digits from 8 digits i. e.

8C3 ways

And also select 2 alphabets from 5 alphabets i.e.,

C
2

5C2 ways

Now to form a alphanumeric word of 5 characters we have to arrange the 5 selected digits.

So the answer is .

8C3

5C2

× 5! = 43200

10. In an Octagon the number of possible diagonals are?

Sol:

Formula : Number of diagonals for n sided regular polygon =

n
nC2–n

For Octagon n = 8

Number of diagonals =

8C2 – 8 = 20

11. What is the next number of the following sequence 7, 14, 55, 110, _ ?

Sol:

In that sequence first number is 7

7 + 7 =14

14 + 41 = 55

55 + 55 = 110

110 + 011 =121 Next number


in that sequence = 121

12. How many numbers are divisible by 4 between 1 to 100

Sol:

Sequence of numbers that are divisible by 4 between 1 to 100 are as follows

4,8,12,16, - - - - - - - - , 96

The series forms an Arithmetic Progression with

First number = a = 4

Common difference,d = 4

Last number = l = 96

Number of terms = n
Formula for last number in A.P. l = [a+(n – 1)

×d]

96 = 4 + (n –1)

×4

n = 24

13. 5 cars are to be parked in 5 parking slots. there are 3 red cars, 1 blue car and 1 green car. How many
ways the car can be parked?

Sol:

Total ways to park the cars having same color = 5!

But according to question ,there are 3 red cars,so no. of ways for parking

3 red cars= 3!

and both blue & green in 1 ways

so,

!
5!1!×3!×1! = 20 ways

Hence correct answer is 20 ways.

14. 12 persons can complete the work in 18 days. after working for 6 days, 4 more persons added to
complete the work fast. in how many more days they will complete the work?

Sol:

Total work 12 x 18 =216 units

After 6 days, work finished 6 x 12 =72 units

Remaining work 216 - 72=144 units

Remaining days=

144

12

144(12+4)

Answer is 9 days

15. A set of football matches is to be organized in a "round-robin" fashion, i.e., every participating team
plays a match against every other team once and only once. If 21 matches are totally played, how many
teams participated?

Sol:

Consider number of teams be n

nth has to with (n –1) matches

(n – 1)th team has to play (n – 2) matches,since every

participating team plays a match against every other team once and only once.
Sequence folilows as

(n – 1), (n – 2), (n – 3) - - - - - - -,1

Formula for summation(x) for n terms =

n(n+1)2

But we have (n –1) terms so formula becomes

n(n–1)2

Equating formula to 21

n2 –

n
n – 42=0

Factors = 7,–6

Number of teams =7

16. Next term in series 3, 32, 405, _

Sol:

First term

3×12=3

Second term

32

4×23=32

Third term

×
3

405

5×34=405

Fourth term

6144

6×45=6144

17. A cube is divided into 729 identical cubelets. Each cut is made parallel to some surface of the cube .
But before doing that the cube is colored with green color on one set of adjacent faces ,red on the other
set of adjacent faces, blue on the third set. So, how many cubelets are there which are painted with
exactly one color?

Sol:

Total cubes created are 729

So a plane of big cube has 9 x 9 cubes

Out of that (n – 2) x (n – 2) = 7 x 7 = 49 are painted only one side

and a cube has six sides = 6 x 49 = 294

18. Find the radius of the circle inscribed in a triangle ABC. Triangle ABC is a right-angled isosceles
triangle with the hypotenuse as

6

62

Sol:

Since hypotenuse is

62 cm.

Sides are 6 cm each as it is an isosceles triangle.

Now, if we have an inscribed circle the property is the point where the circle touches the sides are
exactly 2/3 rd of the length of sides, i.e,

23×6 = 4 cm.

Now, if you drop 2 radii on the sides of triangle then they act as perpendiculars on sides. So, it forms a
small square of (6 – 4) = 2 cm each side.

Thus, radius of the circle is 2 cm.

19. How many boys are there in the class if the number of boys in the class is 8 more than the number of
girls in the class, which is five times the difference between the number of girls and boys in the class.

Sol:

Let number of boys = b

Number of girls = g

then
given

b = 8+g = 5(b – g) [ b – g = 8 from given equation]

b=5x8

b = 40

20. If dolly works hard then she can get A grade

1. If dolly does not work hard then she can get A grade

2. If dolly gets an A grade then she must have worked hard

3. If dolly does not gets an A grade then she must not have worked hard

4. Dolly wishes to get A grad

Sol:

Option 3 is correct as it is contrapositive of the given statement.

1. The hour hand lies between 3 and 4. Tthe difference between hour and minute hand is 50
degree.What are the two possible timings?

Sol:

The angle between the hour hand and minute hand at a given time H:MM is given by

θ = 30

×H –

11

M
211×MM

The time after H hours, hour hand and minute hand are at

MM = |

11

30

211×((30×H)±θ) |

given H = 3, MM = 50

Substituting the above values in the formula

θ=

80

11

8011,

280

11
28011

2. Jack and Jill went up and down a hill. They started from the bottom and Jack met Jill again 20 miles
from the top while returning. Jack completed the race 1 min a head of Jill. If the hill is 440 miles high and
their speed while down journey is 1.5 times the up journey. How long it took for the Jack to complete
the race ?

Sol:

Assume that height of the hill is 440 miles.

Let speed of Jack when going up = x miles/minute

and speed of Jill when going up = y miles/minute

Then speed of Jack when going down = 1.5x miles/minute

and speed of Jill wen going up = 1.5y miles/minute

Case 1 :

Jack met jill 20 miles from the top. So Jill travelled 440 – 20 = 420 miles.

Time taken for Jack to travel 440 miles up and 20 miles down = Time taken for Jill to travel 420 miles up

440

20

1.5

420

440x+201.5x=420y

68
1.5

420

681.5x=420y

68y = 63x

y=

63

68

63x68 ---(1)

Case 2 : Time taken for Jack to travel 440 miles up and 440 miles down = Time taken for Jill to travel 440
miles up and 440 miles down – 1

440

440

1.5

440

+
440

1.5

440x+4401.5x=440y+4401.5y – 1

440

440×53(1y−1x)=1-----(2)

Substitute (2) in (1) we get

x=4

40

×
5

63

40×5×53×63

t=

440

440×53(1x)

t = 12.6min

3. Data Sufficiency question:

A, B, C, D have to stand in a queue in descending order of their heights. Who stands first?

I. D was not the last, A was not the first.

II. The first is not C and B was not the tallest.

Sol:

D because A is not first neither C and B is not the tallest person. The only person will be first is D.

So option (C). We can answer this question using both the statements together.
4. One of the longest sides of the triangle is 20 m. The other side is 10 m. Area of the triangle is 80

m2. What is the another side of the triangle?

Sol:

If a,b,c are the three sides of the triangle.

Then formula for Area =

×
(

(s(s–a)×(s–b)×(s–c))

Where s =

30

)
(a+b+c)2=12×(30+c)

[Assume a = 20 ,b = 10]

Now,

Check the options.

5. Data Sufficiency Question:

a and b are two positive numbers. How many of them are odd?

I. Multiplication of b with an odd number gives an even number.

II.

a2 – b is even.

Sol:

From the 1st statement b is even, as when multiplied by odd it gives even

a2 – b = even

⇒ a is even

Here none of a and b are odd

6. Mr. T has a wrong weighing pan. One arm is lengthier than other. 1 kilogram on left balances 8
melons on right, 1 kilogram on right balances 2 melons on left. If all melons are equal in weight, what is
the weight of a single melon.

Sol:

Let additional weight on left arm be x.


Weight of melon be m

x + 1 = 8 x m - - - - - - (1)

x + 2 x m = 1 - - - - - - (2)

Solving 1 & 2 we get.

Weight of a single Melon = 200 gm.

7. a, b, b, c, c, c, d, d, d, d, . . . . . . Find the 288th letter of this series.

Sol:

Observe that each letter appeared once, twice, thrice .... They form an arithmetic progression.
1+2+3......

We know that sum of first n natural numbers =

n(n+1)2

So

)
2

n(n+1)2

≤ 288

For n = 23, we get 276. So for n = 24, the given series crosses 288.

Ans is X

8. If ABC =

C3 and CAB =

D3, Then find

D3÷B3

Sol:

ABC =

C3
So, look for a number, that has a 3 digit cube, and the last digit of the cube is same as the number itself:

53 = 125

So, CAB = 512 =

83

D = 8 and B = 2

83÷23

Answer = 64.

9. There are three trucks A, B, C. A loads 10 kg/min. B loads 13 1/3 kg/min. C unloads 5 kg/min. If three
simultaneously works then what is the time taken to load 2.4 tones?

Sol:

Work done in 1 min =10 +

40

403 – 5=

55

3
553 kg/min

For 1 kg = 3/55 min

For 2.4 tonnes = 3/55 x 2.4 x 1000 = 130 mins = 2hrs 10min

10. If A =

x3y2 and B=

xy3, then find the HCF of A, B

Sol:

A=

x3×y2

B=

×
y

x×y3

To find the HCF of the above numbers, take minimum power of x and y in both the numbers.

HCF = Common terms from both A & B and minimum powers =

x×y2

11. HERE = COMES – SHE, (Assume s = 8)

Find value of R + H + O

Sol:

HERE = COMES – SHE

HERE

+ SHE

------------

COMES

------------

E + E = S = 8 => E = 4

3 digit no. + 4 digit no. = 5 digit no.

⇒ C = 1 ,O = 0, H = 9 etc

So 9454 + 894 = 10348


10348

– 894

--------

9454

-------

R + H + O = 5 + 9 + 0 = 14

12. A person is 80 years old in 490 and only 70 years old in 500 in which year is he born?

a) 400

b) 550

c) 570

d) 440

Sol:

He must have born in BC 570

Hence in BC 500 he will be 70 years

And in BC 490 he will be 80 years

13. Lucia is a wonderful grandmother and her age is between 50 and 70. Each of her sons have as many
sons as they have brothers. Their combined ages give Lucia's present age.what is the age?

Sol:

The question basically states that if Lucia were to have say 10 sons, then each son would have 9 sons
(Lucia's grandsons – since each son has 9 brothers). So the total in this case would be 9

×10 grandsons + 10 sons = 100.

Let us assume Lucia has got x sons. Now each son has (x - 1) sons. So total = x + (x - 1) x. For x = 8 we
get 64 which is in between 50 and 60. ( 7 x 8 grandsons + 8 sons = 64 )
14. A family X went for a vacation. Unfortunately it rained for 13 days when they were there. But
whenever it rained in the mornings, they had clear afternoons and vice versa. In all they enjoyed 11
mornings and 12 afternoons. How many days did they stay there totally?

Sol:

Clearly 11 mornings and 12 afternoons = 23 half days

since 13 days raining means 13 half days.

so 23 – 13 =10 half days ( not affected by rain )

so 10 half days = 5 full days

Total no. of days = 13 + 5 = 18 days.

15. Find the unit digit of product of the prime number up to 50 .

Sol:

Prime number up to 50 are

2,3,5,7,11,...,43,47

Product =

11


43

47

2×3×5×7×11×−−−×43×47

There's a term

10

2×5=10

So unit digit of product = 0

16. HOW + MUCH = POWER Then P + O + W + E + R =

Sol:

HOW

+ MUCH

-------------

POWER

--------------

Here p = 1 and M = 9 because after adding carry bit it gives result 10. Hence O = 0,here three digits 0,1,9
have been used.
Now, put all remaining value in 3rd column and check which value is suitable for H,U and W and we get
H = 7,U = 8 and W = 5 and 1 carry which will be added in 4th column.

Now in first column we have W + H = R means 5 + 7 = 2 and 1 carry will add in 2nd column

in 2nd column, 0 + C = E,0 + 3 + 1 = 4 so C = 3,E = 4

Therefore,

9837

+ 705

---------

10542

---------

so P + O + W + E + R = 1 + 0 + 5 + 4 + 2 = 12

17. Complete the series..

2 2 12 12 30 30 ?

Sol:

Answer is 56.

It follows the series as:

1x2=2

2x1=2

3 x 4 = 12

4 x 3 = 12

5 x 6 = 30

6 x 5 = 30

7 x 8 = 56

This is the required number for the series.


*************************************************************************************

Many questions are from C/C++/JAVA, DS, OS etc.

Some technical questions asked in interviews are as follows:-

1. What do you mean by 3NF in DBMS?

2. What is join in DBMS?

3. What is pass by value and pass by reference?

4. What is Operating System?

5. Difference between C++ and Java.

6. What is the difference between call by reference and call by value?

7. They asked some tricky questions on pointer.

8. Also asked to write double linked list program.

What is C language?

C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972.


The C programming language is a standardized programming language developed in the early 1970s
by Ken Thompson and Dennis Ritchie for use on the UNIX operating system.
It has since spread to many other operating systems, and is one of the most widely used
programming languages.

2. What are the types of constants in c?


C constants can ba divided into two categories :
Primary constants
Secondary constants

3. What are the types of C intructions?

Now that we have written a few programs let us look at the instructions that we used in these
programs. There are basically three types of instructions in C :
Type Declaration Instruction
Arithmetic Instruction
Control Instruction

4. What is a pointer?
Pointers are variables which stores the address of another variable. That variable may be a scalar
(including another pointer), or an aggregate (array or structure). The pointed-to object may be part of
a larger object, such as a field of a structure or an element in an array.
5. What is the difference between arrays and pointers?
Pointers are used to manipulate data using the address. Pointers use • operator to access the data
pointed to by them.
Arrays is a collection of similar datatype. Array use subscripted variables to access and manipulate
data. Array variables can be Equivalently written using pointer expression.

6. What is “this”s pointer?


The this pointer is a pointer accessible only within the member functions of a class, struct, or union
type. It points to the object for which the member function is called. Static member functions do not
have a this pointer.

7. What are the uses of a pointer?


Pointer is used in the following cases
It is used to access array elements.
It is used for dynamic memory allocation.
It is used in Call by reference.
It is used in data structures like trees, graph, linked list etc.

8. What is the purpose of main() function?


The function main() invokes other functions within it.It is the first function to be called when the
program starts execution.
It is the starting function.
It returns an int value to the environment that called the program.
Recursive call is allowed for main( ) also.
It is a user-defined function.

9. What are the different storage classes in C?


There are four types of storage classes.
Automatic
Extern
Regiter
Static

10. Define inheritance?


Inheritance is the process by which objects of one class acquire properties of objects of another class.

11. Define destuctors?


A destructor is called for a class object when that object passes out of scope or is explicitly deleted.
A destructors as the name implies is used to destroy the objects that have been created by a
constructors.
Like a constructor , the destructor is a member function whose name is the same as the class name
but is precided by a tilde.

12. What is a structure?


Structure constitutes a super data type which represents several different data types in a single unit.
A structure can be initialized if it is static or global.

13. What is message passing?


An object oriented program consists of a set of objects that communicate with each other. Message
passing involves specifying the name of the object, the name of the function and the information to be
sent.

14. Define Constructors?


A constructor is a member function with the same name as its class.
The constructor is invoked whenever an object of its associated class is created.
It is called constructor because it constructs the values of data members of the class.

15. What is the use of default constructor?


A constructors that accepts no parameters is called the default constructor.If no user-defined
constructor exists for a class A and one is needed, the compiler implicitly declares a default
parameterless constructor A::A(). This constructor is an inline public member of its class. The compiler
will implicitly define A::A() when the compiler uses this constructor to create an object of type A. The
constructor will have no constructor initializer and a null body.

16. What is a macro?


Macros are the identifiers that represent statements or expressions. To associate meaningful
identifiers with constants, keywords, and statements or expressions.

17. What is arrays?


Array is a variable that hold multiple elements which has the same data type.

18. What is the difference between #include‹ › and #include “ ”?


#include‹ ›
Specifically used for built in header files.
#include “ ”
Specifically used for used for user defined/created n header file.

19. What are the advantages of the functions?


It reduces the Complexity in a program by reducing the code.
Function are easily understanding and reliability and execution is faster.
It also reduces the Time to run a program.In other way, Its directly proportional to Complexity.
Its easy to find-out the errors due to the blocks made as function definition outside the main function.

20. How do declare an array?


We can declare an array by specify its data type, name and the number of elements the array holds
between square brackets immediately following the array name.
syntax :
data_type array_name[size];

How do you construct an increment statement or decrement statement in C?

There are actually two ways you can do this. One is to use the increment operator ++ and decrement
operator –. For example, the statement “x++” means to increment the value of x by 1. Likewise, the
statement “x –” means to decrement the value of x by 1. Another way of writing increment statements
is to use the conventional + plus sign or – minus sign. In the case of “x++”, another way to write it is “x =
x +1”.
2) What is the difference between Call by Value and Call by Reference?

When using Call by Value, you are sending the value of a variable as parameter to a function, whereas
Call by Reference sends the address of the variable. Also, under Call by Value, the value in the parameter
is not affected by whatever operation that takes place, while in the case of Call by Reference, values can
be affected by the process within the function.

3) Some coders debug their programs by placing comment symbols on some codes instead of deleting it.
How does this aid in debugging?

Placing comment symbols /* */ around a code, also referred to as “commenting out”, is a way of
isolating some codes that you think maybe causing errors in the program, without deleting the code.
The idea is that if the code is in fact correct, you simply remove the comment symbols and continue on.
It also saves you time and effort on having to retype the codes if you have deleted it in the first place.

4) What is the equivalent code of the following statement in WHILE LOOP format?

for (a=1; a<=100; a++)

printf ("%d\n", a * a);

for (a=1; a<=100; a++)

printf ("%d\n", a * a);


Answer:

a=1;

while (a<=100) {

printf ("%d\n", a * a);

a++;

a=1;

while (a<=100) {

printf ("%d\n", a * a);

a++;
}

5) What is a stack?

A stack is one form of a data structure. Data is stored in stacks using the FILO (First In Last Out)
approach. At any particular instance, only the top of the stack is accessible, which means that in order to
retrieve data that is stored inside the stack, those on the upper part should be extracted first. Storing
data in a stack is also referred to as a PUSH, while data retrieval is referred to as a POP.

6) What is a sequential access file?

When writing programs that will store and retrieve data in a file, it is possible to designate that file into
different forms. A sequential access file is such that data are saved in sequential order: one data is
placed into the file after another. To access a particular data within the sequential access file, data has
to be read one data at a time, until the right one is reached.

7) What is variable initialization and why is it important?

This refers to the process wherein a variable is assigned an initial value before it is used in the program.
Without initialization, a variable would have an unknown value, which can lead to unpredictable outputs
when used in computations or other operations.

8 What is spaghetti programming?

C Interview Questions
Spaghetti programming refers to codes that tend to get tangled and overlapped throughout the
program. This unstructured approach to coding is usually attributed to lack of experience on the part of
the programmer. Spaghetti programing makes a program complex and analyzing the codes difficult, and
so must be avoided as much as possible.

9) Differentiate Source Codes from Object Codes

Source codes are codes that were written by the programmer. It is made up of the commands and other
English-like keywords that are supposed to instruct the computer what to do. However, computers
would not be able to understand source codes. Therefore, source codes are compiled using a compiler.
The resulting outputs are object codes, which are in a format that can be understood by the computer
processor. In C programming, source codes are saved with the file extension .C, while object codes are
saved with the file extension .OBJ

10) In C programming, how do you insert quote characters (‘ and “) into the output screen?

This is a common problem for beginners because quotes are normally part of a printf statement. To
insert the quote character as part of the output, use the format specifiers \’ (for single quote), and \”
(for double quote).

11) What is the use of a ‘\0’ character?

It is referred to as a terminating null character, and is used primarily to show the end of a string value.

12) What is the difference between the = symbol and == symbol?

The = symbol is often used in mathematical operations. It is used to assign a value to a given variable.
On the other hand, the == symbol, also known as “equal to” or “equivalent to”, is a relational operator
that is used to compare two values.
13) What is the modulus operator?

The modulus operator outputs the remainder of a division. It makes use of the percentage (%) symbol.
For example: 10 % 3 = 1, meaning when you divide 10 by 3, the remainder is 1.

14) What is a nested loop?

A nested loop is a loop that runs within another loop. Put it in another sense, you have an inner loop
that is inside an outer loop. In this scenario, the inner loop is performed a number of times as specified
by the outer loop. For each turn on the outer loop, the inner loop is first performed.

15) Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

<> is incorrect. While this operator is correctly interpreted as “not equal to” in writing conditional
statements, it is not the proper operator to be used in C programming. Instead, the operator != must
be used to indicate “not equal to” condition.

16) Compare and contrast compilers from interpreters.

Compilers and interpreters often deal with how program codes are executed. Interpreters execute
program codes one line at a time, while compilers take the program as a whole and convert it into
object code, before executing it. The key difference here is that in the case of interpreters, a program
may encounter syntax errors in the middle of execution, and will stop from there. On the other hand,
compilers check the syntax of the entire program and will only proceed to execution when no syntax
errors are found.

17) How do you declare a variable that will hold string values?
The char keyword can only hold 1 character value at a time. By creating an array of characters, you can
store string values in it. Example: “char MyName[50]; ” declares a string variable named MyName that
can hold a maximum of 50 characters.

18) Can the curly brackets { } be used to enclose a single line of code?

While curly brackets are mainly used to group several lines of codes, it will still work without error if you
used it for a single line. Some programmers prefer this method as a way of organizing codes to make it
look clearer, especially in conditional statements.

19) What are header files and what are its uses in C programming?

Header files are also known as library files. They contain two essential things: the definitions and
prototypes of functions being used in a program. Simply put, commands that you use in C programming
are actually functions that are defined from within each header files. Each header file contains a set of
functions. For example: stdio.h is a header file that contains definition and prototypes of commands like
printf and scanf.

20) What is syntax error?

Syntax errors are associated with mistakes in the use of a programming language. It maybe a command
that was misspelled or a command that must was entered in lowercase mode but was instead entered
with an upper case character. A misplaced symbol, or lack of symbol, somewhere within a line of code
can also lead to syntax error.

21) What are variables and it what way is it different from constants?

Variables and constants may at first look similar in a sense that both are identifiers made up of one
character or more characters (letters, numbers and a few allowable symbols). Both will also hold a
particular value. Values held by a variable can be altered throughout the program, and can be used in
most operations and computations. Constants are given values at one time only, placed at the beginning
of a program. This value is not altered in the program. For example, you can assigned a constant named
PI and give it a value 3.1415 . You can then use it as PI in the program, instead of having to write 3.1415
each time you need it.

22) How do you access the values within an array?

Arrays contain a number of elements, depending on the size you gave it during variable declaration.
Each element is assigned a number from 0 to number of elements-1. To assign or retrieve the value of a
particular element, refer to the element number. For example: if you have a declaration that says
“intscores[5];”, then you have 5 accessible elements, namely: scores[0], scores[1], scores[2], scores[3]
and scores[4].

23) Can I use “int” data type to store the value 32768? Why?

No. “int” data type is capable of storing values from -32768 to 32767. To store 32768, you can use “long
int” instead. You can also use “unsigned int”, assuming you don’t intend to store negative values.

24) Can two or more operators such as \n and \t be combined in a single line of program code?

Yes, it’s perfectly valid to combine operators, especially if the need arises. For example: you can have a
code like ” printf (“Hello\n\n\’World\'”) ” to output the text “Hello” on the first line and “World”
enclosed in single quotes to appear on the next two lines.

25) Why is it that not all header files are declared in every C program?

The choice of declaring a header file at the top of each C program would depend on what
commands/functions you will be using in that program. Since each header file contains different
function definitions and prototype, you would be using only those header files that would contain the
functions you will need. Declaring all header files in every program would only increase the overall file
size and load of the program, and is not considered a good programming style.
26) When is the “void” keyword used in a function?

When declaring functions, you will decide whether that function would be returning a value or not. If
that function will not return a value, such as when the purpose of a function is to display some outputs
on the screen, then “void” is to be placed at the leftmost part of the function header. When a return
value is expected after the function execution, the data type of the return value is placed instead of
“void”.

27) What are compound statements?

Compound statements are made up of two or more program statements that are executed together.
This usually occurs while handling conditions wherein a series of statements are executed when a TRUE
or FALSE is evaluated. Compound statements can also be executed within a loop. Curly brackets { } are
placed before and after compound statements.

28) What is the significance of an algorithm to C programming?

Before a program can be written, an algorithm has to be created first. An algorithm provides a step by
step procedure on how a solution can be derived. It also acts as a blueprint on how a program will start
and end, including what process and computations are involved.

29) What is the advantage of an array over individual variables?

When storing multiple related data, it is a good idea to use arrays. This is because arrays are named
using only 1 word followed by an element number. For example: to store the 10 test results of 1
student, one can use 10 different variable names (grade1, grade2, grade3… grade10). With arrays, only 1
name is used, the rest are accessible through the index name (grade[0], grade[1], grade[2]… grade[9]).

JAVA QUESTION PAPER

Explain JVM, JRE and JDK?


JVM (Java Virtual Machine): It is an abstract machine. It is a specification that provides run-time
environment in which java bytecode can be executed. It follows three notations:

Specification: It is a document that describes the implementation of the Java virtual machine. It is
provided by Sun and other companies.

Implementation: It is a program that meets the requirements of JVM specification.

Runtime Instance: An instance of JVM is created whenever you write a java command on the command
prompt and run the class.

JRE (Java Runtime Environment) : JRE refers to a runtime environment in which java bytecode can be
executed. It implements the JVM (Java Virtual Machine) and provides all the class libraries and other
support files that JVM uses at runtime. So JRE is a software package that contains what is required to
run a Java program. Basically, it’s an implementation of the JVM which physically exists.

JDK(Java Development Kit) : It is the tool necessary to compile, document and package Java programs.
The JDK completely includes JRE which contains tools for Java programmers. The Java Development Kit
is provided free of charge. Along with JRE, it includes an interpreter/loader, a compiler (javac), an
archiver (jar), a documentation generator (javadoc) and other tools needed in Java development. In
short, it contains JRE + development tools.

Refer to this below image and understand how exactly these components reside:

Components - Java Interview Questions - Edureka

Q2. Explain public static void main(String args[]).

public : Public is an access modifier, which is used to specify who can access this method. Public means
that this Method will be accessible by any Class.

static : It is a keyword in java which identifies it is class based i.e it can be accessed without creating the
instance of a Class.

void : It is the return type of the method. Void defines the method which will not return any value.
main: It is the name of the method which is searched by JVM as a starting point for an application with a
particular signature only. It is the method where the main execution occurs.

String args[] : It is the parameter passed to the main method.

Q3. Why Java is platform independent?

Platform independent practically means “write once run anywhere”. Java is called so because of its byte
codes which can run on any system irrespective of its underlying operating system.

Q4. Why java is not 100% Object-oriented?

Java is not 100% Object-oriented because it makes use of eight primitive datatypes such as boolean,
byte, char, int, float, double, long, short which are not objects.

Q5. What are wrapper classes?

Wrapper classes converts the java primitives into the reference types (objects). Every primitive data
type has a class dedicated to it. These are known as wrapper classes because they “wrap” the primitive
data type into an object of that class. Refer to the below image which displays different primitive type,
wrapper class and constructor argument.

WrapperClass - Java Interview Questions - Edureka

Q6. What are constructors in Java?

In Java, constructor refers to a block of code which is used to initialize an object. It must have the same
name as that of the class. Also, it has no return type and it is automatically called when an object is
created.

There are two types of constructors:


Default constructor

Parameterized constructor

Q7. What is singleton class and how can we make a class singleton?

Singleton class is a class whose only one instance can be created at any given time, in one JVM. A class
can be made singleton by making its constructor private.

Q8. What is the difference between Array list and vector?

Array List Vector

Array List is not synchronized. Vector is synchronized.

Array List is fast as it’s non-synchronized. Vector is slow as it is thread safe.

If an element is inserted into the Array List, it increases its Array size by 50%. Vector defaults to
doubling size of its array.

Array List does not define the increment size. Vector defines the increment size.

Array List can only use Iterator for traversing an Array List. Except Hashtable, Vector is the only
other class which uses both Enumeration and Iterator.

Q9. What is the difference between equals() and == ?

Equals() method is defined in Object class in Java and used for checking equality of two objects defined
by business logic.

“==” or equality operator in Java is a binary operator provided by Java programming language and used
to compare primitives and objects. public boolean equals(Object o) is the method provided by the
Object class. The default implementation uses == operator to compare two objects. For example:
method can be overridden like String class. equals() method is used to compare the values of two
objects.

public class Equaltest {

public static void main(String[] args) {

String str1= new String(“ABCD”);

String str2= new String(“ABCD”);


if(Str1 == str2)

System.out.println("String 1 == String 2 is true");

else

System.out.println("String 1 == String 2 is false");

String Str3 = Str2;

if( Str2 == Str3)

System.out.println("String 2 == String 3 is true");

else

System.out.println("String 2 == String 3 is false");

if(Str1.equals(str2))

System.out.println("String 1 equals string 2 is true");

else

System.out.prinltn("String 1 equals string 2 is false");

}}
Q10. What are the differences between Heap and Stack Memory?

The major difference between Heap and Stack memory are:

Features Stack Heap

Memory Stack memory is used only by one thread of execution. Heap memory is used by all the
parts of the application.

Access Stack memory can’t be accessed by other threads. Objects stored in the heap are globally
accessible.

Memory Management Follows LIFO manner to free memory. Memory management is based on
generation associated to each object.

Lifetime Exists until the end of execution of the thread. Heap memory lives from the start till
the end of application execution.

Usage Stack memory only contains local primitive and reference variables to objects in heap space.
Whenever an object is created, it’s always stored in the Heap space.

In case you are facing any challenges with these java interview questions, please comment your
problems in the section below. Apart from this Java Interview Questions Blog, if you want to get trained
from professionals on this technology, you can opt for a structured training from edureka! Click below to
know more.

Get Started with Java

OOPS Java Interview Questions:

Q1. What is Polymorphism?


Polymorphism is briefly described as “one interface, many implementations”. Polymorphism is a
characteristic of being able to assign a different meaning or usage to something in different contexts –
specifically, to allow an entity such as a variable, a function, or an object to have more than one form.
There are two types of polymorphism:

Compile time polymorphism

Run time polymorphism

Compile time polymorphism is method overloading whereas Runtime time polymorphism is done using
inheritance and interface.

Q2. What is runtime polymorphism or dynamic method dispatch?

In Java, runtime polymorphism or dynamic method dispatch is a process in which a call to an overridden
method is resolved at runtime rather than at compile-time. In this process, an overridden method is
called through the reference variable of a superclass. Let’s take a look at the example below to
understand it better.

class Car {

void run()

System.out.println(“car is running”);

class Audi extends Car {


void run()

System.out.prinltn(“Audi is running safely with 100km”);

public static void main(String args[])

Car b= new Audi(); //upcasting

b.run();

Q3. What is the difference between abstract classes and interfaces?

Abstract Class Interfaces

An abstract class can provide complete, default code and/or just the details that have to be overridden.
An interface cannot provide any code at all,just the signature.

In case of abstract class, a class may extend only one abstract class. A Class may implement several
interfaces.

An abstract class can have non-abstract methods. All methods of an Interface are abstract.

An abstract class can have instance variables. An Interface cannot have instance variables

An abstract class can have any visibility: public, private, protected. An Interface visibility must be
public (or) none.

If we add a new method to an abstract class then we have the option of providing default
implementation and therefore all the existing code might work properly If we add a new method to an
Interface then we have to track down all the implementations of the interface and define
implementation for the new method

An abstract class can contain constructors An Interface cannot contain constructors

Abstract classes are fast Interfaces are slow as it requires extra indirection to find corresponding method
in the actual class

Q4. What is method overloading and method overriding?


Method Overloading :

In Method Overloading, Methods of the same class shares the same name but each method must have
different number of parameters or parameters having different types and order.

Method Overloading is to “add” or “extend” more to method’s behavior.

It is a compile time polymorphism.

The methods must have different signature.

It may or may not need inheritance in Method Overloading.

Let’s take a look at the example below to understand it better.

class Adder {

Static int add(int a, int b)

return a+b;

Static double add( double a, double b)

return a+b;

public static void main(String args[])

System.out.println(Adder.add(11,11));

System.out.println(Adder.add(12.3,12.6));

}}

Method Overriding:
In Method Overriding, sub class have the same method with same name and exactly the same number
and type of parameters and same return type as a super class.

Method Overriding is to “Change” existing behavior of method.

It is a run time polymorphism.

The methods must have same signature.

It always requires inheritance in Method Overriding.

Let’s take a look at the example below to understand it better.

class Car {

void run(){

System.out.println(“car is running”);

Class Audi extends Car{

void run()

System.out.prinltn(“Audi is running safely with 100km”);

public static void main( String args[])

Car b=new Audi();

b.run();

Q5. Can you override a private or static method in Java?


You cannot override a private or static method in Java. If you create a similar method with same return
type and same method arguments in child class then it will hide the super class method; this is known as
method hiding. Similarly, you cannot override a private method in sub class because it’s not accessible
there. What you can do is create another private method with the same name in the child class. Let’s
take a look at the example below to understand it better.

class Base {

private static void display() {

System.out.println("Static or class method from Base");

public void print() {

System.out.println("Non-static or instance method from Base");

class Derived extends Base {

private static void display() {

System.out.println("Static or class method from Derived");

public void print() {

System.out.println("Non-static or instance method from Derived");

public class test {

public static void main(String args[])

Base obj= new Derived();

obj1.display();

obj1.print();
}

Q6. What is multiple inheritance? Is it supported by Java?

MultipleInheritance - Java Interview Questions - EdurekaIf a child class inherits the property from
multiple classes is known as multiple inheritance. Java does not allow to extend multiple classes.

The problem with multiple inheritance is that if multiple parent classes have a same method name, then
at runtime it becomes difficult for the compiler to decide which method to execute from the child class.

Therefore, Java doesn’t support multiple inheritance. The problem is commonly referred as Diamond
Problem.

Q7. What is association?

Association is a relationship where all object have their own lifecycle and there is no owner. Let’s take
an example of Teacher and Student. Multiple students can associate with a single teacher and a single
student can associate with multiple teachers but there is no ownership between the objects and both
have their own lifecycle. These relationship can be one to one, One to many, many to one and many to
many.

Q8. What do you mean by aggregation?

Aggregation is a specialized form of Association where all object have their own lifecycle but there is
ownership and child object can not belongs to another parent object. Let’s take an example of
Department and teacher. A single teacher can not belongs to multiple departments, but if we delete the
department teacher object will not destroy.

Q9. What is composition in Java?

Composition is again specialized form of Aggregation and we can call this as a “death” relationship. It is a
strong type of Aggregation. Child object dose not have their lifecycle and if parent object deletes all child
object will also be deleted. Let’s take again an example of relationship between House and rooms.
House can contain multiple rooms there is no independent life of room and any room can not belongs to
two different house if we delete the house room will automatically delete.

In case you are facing any challenges with these java interview questions, please comment your
problems in the section below. Apart from this Java Interview Questions Blog, if you want to get trained
from professionals on this technology, you can opt for a structured training from edureka! Click below to
know more.

*******************************

HR ROUND

HR Interview Questions For Freshers

Tell me about yourself.

Why should I hire you?

What are your strengths and weaknesses?

Why do you want to work at our company?

What is the difference between confidence and over confidence?

What is the difference between hard work and smart work?

How do you feel about working nights and weekends?

Can you work under pressure?

Are you willing to relocate or travel?

What are your goals?

What motivates you to do good job?

What makes you angry?

Give me an example of your creativity.

How long would you expect to work for us if hired?

Are not you overqualified for this position?

Describe your ideal company, location and job.


What are your career options right now?

Explain how would be an asset to this organization?

What are your outside interests?

Would you lie for the company?

Who has inspired you in your life and why?

What was the toughest decision you ever had to make?

Have you considered starting your own business?

How do you define success and how do you measure up to your own definition?

If you won $10 million lottery, would you still work?

Tell me something about our company.

How much salary do you expect?

Where do you see yourself five years from now?

On a scale of one to ten, rate me as an interviewer.

Do you have any questions for me?

You might also like