Capgemini Previous Papers
Capgemini Previous Papers
company
Capgemini is a French Multinational company headquartered in Paris. IT
consulting, Management consulting, Cloud infrastructure & consulting are
some of the major services provided by Capgemini. Capgemini Company was
established in 1967. Capgemini is one of the best places to work among the
other IT companies. Capgemini has nearly 200,000 employees and has
offices in around 40 countries.
Ans: 21%
Explanation
Here the 10% is successively increased, so (a+b+ab/100) can be used to find the overall percentage gain.
%Profit = (10 + 10 + (10*10)/100) = 21
2) Seema is 5 years older than her brother Mac. The product of their ages is 204 years. What is the age of
Mac?
(a) 12 years (b) 8 years (c) 6 years (d) 10 years
Ans: 12 years
Explanation
Let the age of Mac will be x yrs. Then Seema age =x+5
Acc to question: (x+5)x = 204, by solving this we get x= 12 years.
3) Lalit marks up his goods by 40% and gives a discount of 10%. Apart from this, he uses a faulty balance
also, which reads 1000 gm for 800 gm. What is his net profit percentage?
(a) 57.5% (b) 57% (c) 61% (d) 62.5%
Ans: 57.5%
Explanation
Let us assume his CP/1000 gm = Rs 100
The SP/kg (800 gm) = Rs 126
So, his CP/800 gm = Rs 80
So, profit = Rs 46
So, profit percentage = 46/80 x 100 = 57.5%
4) In a bag, there are a certain number of toy-blocks with alphabets A, B, C and D written on them. The
ratio of blocks A:B:C:D is in the ratio 4:7:3:1. If the number of ‘A’ blocks is 50 more than the number of
‘C’ blocks, what is the number of ‘B’ blocks?
(a) 120 (b) 350 (c) 240 (d) 210
Ans: 350
Explanation
Let the number of the blocks A,B,C,D be 4x, 7x, 3x and 1x respectively
4x = 3x + 50 → x = 50. So the number of ‘B’ blocks is 7*50 = 350.
5) If 60 ml of water contains 12% of chlorine, how much water must be added in order to create a 8%
chlorine solution?
(a) 10ml (b) 35ml (c) 20ml (d) 30ml
Ans: 30ml
Explanation
Let x ml of chlorine be present in water.
Then, 12/100 = x/60 → x = 7.2 ml
Therefore, 7.2 ml is present in 60 ml of water.
In order for this 7.2 ml to constitute 8% of the solution, we need to add extra water. Let this be y ml, then
8/100 of y = 7.2ml → y = 90 ml.
So in order to get 8% chlorine solution, we need to add 90-60 = 30 ml of water.
Ans: 98:75
Explanation
Since a and b are in the ratio 7:5. Then, let a = 7x and b = 5x.
c = 2a = 2 * 7x = 14x and d = 3b = 3 * 5x = 15x.
c : d = 14 : 15 à ac : bd = 14 * 7 : 15 * 5 = 98 : 75
7) The average score of a cricketer for ten matches is 38.9 runs. If the average for the first six matches is
42, then find the average for the last four matches.
(a) 33.25 (b) 33.5 (c) 34.25 (d) 35
Ans: 34.25
Explanation
Total sum of last 4 matches = (10×38.9)–(6×42)
=389–252=137
Average = 137/4 = 34.25
8) A grocer has a sale of Rs. 6435, Rs. 6927, Rs. 6855, Rs. 7230 and Rs. 6562 for 5 consecutive months.
How much sale must he have in the sixth month so that he gets an average sale of Rs. 6500?
(a) 4991 (b) 5467 (c) 5987 (d) 6453
9) The average of five consecutive odd numbers is 61. What is the difference between the highest and
lowest numbers :
(a) 4 (b) 8 (c) 12 (d) 16
Ans: 8
Explanation
Let the numbers be x, x + 2, x + 4, x + 6 and x + 8.
Then [x + (x + 2) + (x + 4) + (x + 6) + (x + 8)] / 5 = 61.
Or 5x + 20 = 305 or x = 57.
So, required difference = (57 + 8) – 57 = 8
10) A car travels at a speed of 60 km/h and returns with a speed of 40 km/h, calculate the average speed
for the whole journey.
(a) 48 kmph (b) 38 kmph (c) 32 kmph (d) 16 kmph
Ans: 48 kmph
Explanation:
Since equal distances are covered at 60 kmph and 40 kmph, we can apply the formula 2xy/(x+y). Average
speed = (2×40×60) / (40 + 60) = 48 kmph
11) A motorboat can travel at 5 km/hr in still water. It travelled 90 km downstream in a river and then
returned, taking altogether 100 hours. Find the rate of flow of the river.
(a) 3 kmph (b) 3.5 kmph (c) 2 kmph (d) 4 kmph
Ans: 4 kmph
Explanation:
Speed of boat in still water = x = 5 km/hr.
Let rate of flow of river = y km/hr.
Year
Fuel and
Salary Bonus Interest on Loans Taxes
Transport
12) What is the average amount of interest per year which the company had to pay during this period?
Ans: 36.66
Explanation
Average amount of the interest paid by the company during the given period.
= [ 23.4 + 32.5 + 41.6 + 36.4 + 49.4 ]/ 5
= 183.3/ 5 = 36.66
13) The total amount of bonus paid by the company during the given period is approximately what
percent of the total amount of salary paid during this period?
(a) 0.1% (b) 0.5% (c) 1.0% (d) 1.25%
Ans: 1.0 %
Explanation
= [ (3.00 + 2.52 + 3.84 + 3.68 + 3.96) / (288 + 342 + 324 + 336 + 420) ] * 100
= [ 17/ 1710 * 100] %
~ 1%
14) Total expenditure on all these items in 1998 was approximately what percent of the total expenditure
in 2002?
(a) 62% (b) 66% (c) 69% (d) 71%
Ans: 69%
Explanation
= [ (288 + 98 + 3.00 + 23.4 + 83)/(420 + 142 + 3.96 + 49.4 + 98) ] * 100
= [495.4/713.36 * 100] %
~ 69.45%
15) The total expenditure of the company over these items during the year 2000 is?
(a) 544.44 (b) 501.11 (c) 446.46 (d) 478.87
Ans: 544.44
Explanation
Total expenditure of the Company during 2000 = (324 + 101 + 3.84 + 41.6 + 74) = 544.44
16) The ratio between the total expenditure on Taxes for all the years and the total expenditure on Fuel
and Transport for all the years respectively is approximately?
(a) 4:7 (b) 15:18 (c) 10:13 (d) 5:8
Ans: 10:13
Explanation
[ (83 + 108 + 74 + 88 + 98) / (98 + 112 + 101 + 133 + 142) ] = [451/ 586] = 1/ 1.3
= 10/13 à 10:13
17) The sum of third and ninth term of an A.P is 8. Find the sum of the first 11 terms of the progression.
(a) 44 (b) 22 (c) 19 (d) None
Ans: 44
Explanation
The third term t3 = a + 2d
The ninth term t9 = a + 8d
t3 + t9 = 2a + 10d = 8
Sum of first 11 terms of an AP is given by,
S11 = 11/2 [2a + 10d] = 11/2 * 8 = 44
Ans: 11
Explanation:The required numbers are 14, 21, 28, … 84
This is an A.P with a = 14, d = (21-14) = 7
Let the number of terms be n, then Tn = 84 à a + (n-1) d = 84
14 + (n-1) * 7 = 84
n = 11
19) The price of 2 sarees and 4 shirts is Rs. 1600. With the same money one can buy 1 saree and 6 shirts.
If one wants to buy 12 shirts, how much shall he have to pay?
(a) Rs. 1200 (b) Rs. 2400 (c) Rs. 4800 (d) None
20) Simplify:
Ans: 4
Explanation:
Given expression à (a + b)2 – (a – b)2 / ab
= 4ab / ab
= 4 (where a = 469, b = 174)
21) The average salary of 3 teachers is 95 Rs. per week. If one earns Rs.115 and second earns Rs.65 how
much is the salary of the 3rd teacher. [Average][Capgemini 2017]
Ans: 105
22) A 16 stored apartment has 12000 sq.feet on each floor. Company A rents 7 floors and company B
rents 4 floors. What is the number of sq.feet of unrented floor space. [Numbers] [Capgemini 2018]
Ans: 60000
23) During a given week a person spends 1/4 of his time preparing flow chart, 3/8 of his time coding and
the rest of the time in debugging the programs. If he works 48 hours during the week , how many hours
did he spend debugging the program?
Ans: 18
24) If 12 file cabinets require 18 feet of wall space, how many feet of wall space will 30 cabinets
require?
Ans.45
25) A computer printer produced 176,400 lines in a given day. If the printer was in operation for
seven hours during the day, how many lines did it print per minute?
Ans: 420
26) From its total income, a sales company spent Rs.20,000 for advertising, half of the remainder on
commissions and had Rs.6000 left. What was its total income? [Equations] [Capgemini 2016]
Ans.32000
27. A 30% loss on cost price is what percent loss on selling price?
Answer: Option D
Let CP = 100 ; SP=70
Loss= 30/70 × 100 = 42.85%
28.) A, B and C hire a taxi for Rs. 2400 for one day. A, B and C used the car for 6 hours, 8 hours
and 10 hours respectively. How much did C pay?
Answer: Option B
Let total fair be = 2400 ;
Therefore c share =10/24 × 2400 = 1000
29)The ratio of investments of A and B is 8 : 7 and the ratio of their yearend profits is 20 : 21. If B
invested for 12 months, then find the period of investment of A:
Answer: Option C
Let A invest for x months ; A = 8x months,
B = 7 × 12 = 84 months
⇒ x = 10
8x/84 = 20/21
Answer: Option C
%=144/60×60 = 4%
Answer: Option D
3 cos 80°. Cosec 10° + 2 cos 59° . cosec 31°
= 3 cos (90° - 10°). Cosec 10° + 2 cos (90° - 31°).Cosec 31°
=3sin10°.Cosec10° +2sin31°.cosec31°
=3+2=5
32)The total cost of 8 buckets and 5 mugs is Rs. 92 and the total cost of 5 buckets and 8 mugs is Rs.
77. Find the cost of 2 mugs and 3 buckets.
Answer: Option A
CP of 1 bucket = Rs. X
∴ 8x + 5y = 92....... (i)
CP of 1 mug = Rs. Y
5x + 8y = 77........(ii)
By equation (i) × 5 – equation (ii) × 8.
8x + 20 = 92 ⇒8x = 92 – 20 = 72 ⇒ x = 9
From equation (i),
Answer: Option C
⇒ 8 + 2P = 12
When x = 6, (4 * 6)/3 + 2P = 12
⇒ 2P = 12 – 8 = 4
⇒P=2
34)What number must be added to the expression 16a2 – 12a to make it a perfect square?
A)9/4 B)11/2 C)13/2 D)16
Answer & Explanation
Answer: Option A
A)1st, 2nd and 3rd quadrant B)1st, 2nd and 4th quadrant C)2nd, 3rd and 4th quadrant
Answer: Option B
The usual way to solve these type of questions is to put x = 0 once and find y coordinate. This would
represent the point where the line cuts the Y axis.
Similarly put y = 0 once and find x coordinate. This would represent the point where the line cuts the X
axis. Then join these points and you will get the graph of the line.
So when we put x = 0 we get y = 4.
When we put y = 0 we get x = 6.
So when we join these points we see that we get a line in 1st quadrant, which when extended both sides
would go to 4th and 2nd quadrants. So option B.
∠A + ∠B = 65°
Answer: Option B
1) Data Arrangements: The only people to attend a conference were four ship captains and the first
mates of three of those captains. The captains were L, M, N and O; the first mates were A, D and G Each
person in turn delivered a report to the assembly as follows: Each of the first mates delivered their report
exactly after his or her captain. The first captain to speak was M, and captain N spoke after him.
[Capgemini 2017]
Ans: e
2) In case L speaks after A, and A is the third of the first mates to speak, then among the following
statements which would be untrue?
Ans: A
Ans: a
4) Syllogisms:
These questions are the most repeated Capgemini logical reasoning questions asked in previous drives.
Directions for 1 – 5:
1) Look carefully at the sequence of symbols to find the pattern. Select the correct pattern.
Ans: d
2)
Ans: c
3)
Ans: a
4)
Ans: b
5)
Ans: c
6) Statement: Population increase coupled with depleting resources is going to be the scenario of many
developing countries in days to come.
Conclusions:
I. The population of developing countries will not continue to increase in the future.
II. It will be very difficult for the governments of developing countries to provide its people
da ecent quality of life.
a) Only conclusion I follows
b) Only conclusion II follows
c) Either I or II follows
d) Neither I nor II follows
Ans: b
Explanation
The fact given in I is quite contrary to the given statement. So, I do not follow, II mentions the direct
implications of the state discussed in the statement. Thus, II follows.
7) Statement: Any student who does not behave properly while in the school brings bad name to himself
and also for the school.
Conclusions:
I. Such a student should be removed from the school.
II. Stricter discipline does not improve the behavior of the students.
a) Only conclusion I follows
b) Only conclusion II follows
c) Either I or II follows
d) Neither I nor II follows
Ans: d
Explanation
Clearly, I cannot be deduced from the statement. Also, nothing about discipline is mentioned in the
statement. So, neither I nor II follows.
8) Statement: A man must be wise to be a good wrangler. Good wranglers are talkative and boring.
Conclusions:
I. All the wise persons are boring.
II. All the wise persons are wWranglers
a) Only conclusion I follows
b) Only conclusion II follows
c) Either I or II follows
d) Neither I nor II follows
Ans: d
Directions: 9-10
In each of the following questions, a statement/group of statements is given followed by some
conclusions. Without resolving anything your-self choose the conclusion which logically follows from the
given statements.
9) Statement: A factory worker has five children. No one else in the factory has five children.
Conclusions:
a) All workers in the factory have five children each.
b) Everybody in the factory has children.
c) Some of the factory workers have more than five children.
d) Only one worker in the factory has exactly five children.
Ans: d
Conclusions:
a) If A is a beggar, then A is not rich.
b) If A is not rich, then A is not a beggar.
c) All those who are poor are beggars.
d) If A is rich, then A is not a beggar.
Ans: d
11) Pointing to a photograph of a boy Suresh said, “He is the son of the only son of my mother.” How is
Suresh related to that boy?
A. Brother B. Uncle C. Cousin D. Father
Ans: D
Explanation
Suresh’s mother’s only son is Suresh himself. So, the boy in the photo is Suresh’s son, i.e. Suresh is the
boy’s father.
12) Given, M % N means M is the son of N, M @ N means M is the sister of N and M $ N means M is
the father of N. Which of the following shows the relation that C is the granddaughter of E?
A. C % B $ F $ E B. B $ F $ E % C
C. C @ B % F % E D. E % B $ F $ C
Ans: C
Explanation
C is the granddaughter of E.
13) ‘Reds’ are ‘blues’, ‘blues’ are ‘whites’, ‘whites’ are ‘yellows’, ‘yellows’ are ‘oranges’, ‘oranges’ are
‘pinks’, then what is the color of the sky?
A. pinks B. blue C. white D. yellow
Ans: white
Explanation: Sky is blue, but blues are whites
14) In a certain code, COMPUTER is written as RFUVQNPC. How is MEDICINE written in the same
code?
a) MFEDJJOE
b) EOJDEJFM
c) MFEJDJOE
d)EOJDJEFM
Ans: d
Explanation
The letters of the word are written in reverse order and expect the first and the last letter all other letters
are move one step forward.
15) In a certain code language : ‘dugo hui mul zo’ stans for ‘work is very hard’ ‘hui dugo ba ki’ for
‘Bingo is very smart’; ‘nano mul dugo’ for ‘cake is hard’; and ‘mul ki gu’ for ‘smart and hard’ Which of
the following word stand for Bingo ?
a) Jalu
b) Dugo
c) Ki
d) Ba
Ans: d
16) If A + B means A is the brother of B; A – B means A is the sister of B and A x B means A is the
father of B. Which of the following means that C is the son of M?
a) M – N x C + F
b) F – C + N x M
c) N + M – F x C
d) M x N – C + F
Ans: d
Explanation:
M x N → M is the father of N
N – C → N is the sister of C and C + F → C is the brother of F.
Hence, M is the father of C or C is the son of M.
Ans: a
Explanation
F3M → F is the wife of M
M5K → M is the father of K
Therefore, F is the mother of K.
You will be working under a very strict time limit and are required to work fast but precise.
18) Try to compare the four text strings below, are they 100% identical? If not find the non-identical one.
a) 256 Hickory Heights Drive,
Hanover, 21076
b) 256 Hickory Heights Drive,
c) Hanover, 21876
d) 256 Hickory Heights Drive,
Hanover, 21076
256 Hickory Heights Drive,
Hanover, 21076
Ans: b
Explanation
No, one of the four addresses reads ‘21876’ instead of ‘21076’. Finding this difference may have been
easy for you, but remember that you will be required to answer many of these within a short time.
Column A Column B
Ph #847-728-9676 Ph #847-728-9676
a) Alike
b) Different
Ans: Alike
Column A Column B
Stephen M. Jackson Stephem M. Jackson
a) Alike
b) Different
Ans: Different
DIRECTIONS for the questions 1 to 5 : Study the given information carefully and answer the given
questions:
1Eight people -A, B, C, D, E, F, G and H are sitting around a circular table facing the centre, not
necessarily in the same order. Three people are sitting between A and D. B is sitting second to the right of
A. C is to the immediate right of F. D is not an immediate neighbour of either F or E. H is not an
immediate neighbour of B
A)Third to the left B)Second tot the right C)Third to the right D)Second to the left
Answer: Option D
2)Four of the following five are alike in a certain way, based on their seating positions in the above
arrangement and so form a group. Which one does not belong to the group?
Answer: Option B
From above figure it is clear that the answer is 2nd option, As the gap between the persons in all other
pairs is of 1 person.
Therefore, the correct answer is option B.
3)Who is sitting third to the right of the one who is sitting to the immediate right of H?
Answer: Option C
E)None Of these
Answer: Option B
5)How many people are sitting between H and A when counted from the right side of H?
DIRECTIONS for the questions 6 to 7: The question below has either two or three statements followed by
two or three conclusions. You have to take the given statements to be true and then decide which of the
given conclusions logically follows from the given statements, disregarding the commonly known facts.
Answer: Option A
This means atleast one card is form, which is definitely true for all the possible cases. So, conclusion I
follows.
II. This means that atleast one card is paper,which is not a necessarily true answer.So, conclusion II does
not follow.
Therefore, only conclusion 1 follows.So, the answer is option A.
Answer: Option B
DIRECTIONS for the questions 8 to 10: In these questions, relationships between different elements is
shown in the statements. These statements are followed by two conclusions.
8)Statements : N ≥ O ≥ P = Q > R.
Conclusions :
I. N > R
II. R = N
Answer: Option A
Answer: Option D
I. We have B > W and Z > W
On this basis, we can not conclude that B > Z
II. Here, X > W and X < Z > A
On this basis, we can not conclude that W < A
Therefore, none of the conclusions follows.
The answer is option D. S
Answer: Option E
I. I > K and K > M. So I > M. Conclusion I follows
II. L < K and K < H. So L < H. Conclusion II follows
So both conclusion follows.
The answer option is E
Read n
i=0,s=0
Function Sample(int n)
while(n>0)
r=n%l0
p=8^i
s=s+p*r
i++
n=n/10
End While
Return s;
End Function
a) 27
b) 187
c) 87
d) 120
Ans: Option C
Read N
Function sample(N)
s = 0, f = 1, i=1;
Do Until i <= N
f = f * i;
s = s +(i / f);
i=i+1
End Do
return(s);
End Function
a) 666667
b) 718282
c) 708333
d) 716667
Ans: Option B
Read limit
n1 = 0, n2= 1, n3=1, count = 1;
while count <= limit
count=count+1
print n3
n3 = n1 + n2
n1 = n2
n2 = n3
End While
a) 1235813
b) 12358
c) 123581321
d) 12358132
Ans: Option A
Read number
Function divisible(number)
even_counter = 0, num_remainder = number;
while (num_remainder)
digit = num_remainder % 10;
if digit != 0 AND number % digit == 0
even_counter= even_counter+1
End If
num_remainder= num_remainder / 10;
End While
return even_counter;
a) 3
b) 4
c) 2
d) 1
Answer: Option D
Read a,b
Function mul(a, b)
t=0
while (b != 0)
t=t+a
b=b-1
End While
return t;
End Function
a) 490563
b) 49056
c) 490561
d) None of the mentioned
Ans: Option B
Read size
Read a[1],a[2],…a[size]
i=0
While(i<size)
j=i+1
While(j<size)
If a[i] < a[j] then
t= a[i];
a[i] = a[j];
a[j] = t;
End If
j=j+1
End While
i=i+1
End While
i=0
While (i<size)
print a[i]
i=i+1
End While
wrong statement?
a) Line 4
b) Line 6
c) Line 7
d) No Error
Ans: Option C
7) What is the time complexity of searching for an element in a circular linked list?
a) O(n)
b) O(nlogn)
c) O(1)
d) None of the mentioned
Ans: Option A
8) In the worst case, the number of comparisons needed to search a singly linked list of length n
for a given element is
a) log 2 n
b) n
⁄2
c) log 2 n – 1
d) n
Ans: Option D
Ans: Option A
{
…
ch = ‘b’;
while(ch >= ‘a’ && ch <= ‘z’)
ch++;
}
a) 0
b) 25
c) 26
d) 1
Ans: B
11) Consider the following piece of code. What will be the space required for this code?
a) 2n + 8
b) 2n + 4
c) 2n + 2
d) 2n
Ans: A
a) 56
b) 88
c) 72
d) 65
Ans: C
a) 6
b) 5
c) 10
d) 15
Ans: D
a) 21
b) 15
c) 9
d) 6
Ans: A
15) Consider a hash table with 9 slots. The hash function is h(k) = k mod 9. The collisions are
resolved by chaining. The following 9 keys are inserted in the order: 5, 28, 19, 15, 20, 33, 12, 17,
10. The maximum, minimum, and average chain lengths in the hash table, respectively, are
a) 3, 0, and 1
b) 3, 3, and 3
c) 4, 0, and 1
d) 3, 0, and 2
Ans: A
16) You have an array of n elements. Suppose you implement a quick sort by always choosing
the central element of the array as the pivot. Then the tightest upper bound for the worst case
performance is:
a) O(n2)
b) O(nLogn)
c) Θ(nLogn)
d) O(n3)
Ans: A
17) Let G be a graph with n vertices and m edges. What is the tightest upper bound on the
running time on Depth First Search of G? Assume that the graph is represented using adjacency
matrix.
a) O(n)
b) O(m+n)
c) O(n2)
d) O(mn)
Ans: C
18) Let P be a Quick Sort Program to sort numbers in ascending order using the first element as a
pivot. Let t1 and t2 be the number of comparisons made by P for the inputs {1, 2, 3, 4, 5} and {4,
1, 5, 3, 2} respectively. Which one of the following holds?
a) t1 = 5
b) t1 < t2
c) t1 > t2
d) t1 = t2
Ans: C
a) Preorder traversal
b) Inorder traversal
c) Postorder traversal
d) Level order traversal
Ans: C
20) How will you find the minimum element in a binary search tree?
Ans: a
21) What is the time complexity of searching for an element in a circular linked list?
a) O(n)
b) O(nlogn)
c) O(1)
d) None of the mentioned
Ans: Option A
22) In the worst case, the number of comparisons needed to search a singly linked list of length n for a
given element is
a) log 2 n
b) n
⁄2
c) log 2 n – 1
d) n
Ans: Option D
Read limit
n1 = 0, n2= 1, n3=1, count = 1;
while count <= limit
count=count+1
print n3
n3 = n1 + n2
n1 = n2
n2 = n3
End While
a) 1235813
b) 12358
c) 123581321
d) 12358132
Ans: Option A
Capgemini Essay Writing Topics (Most asked
in recent drives)
Here are few essay writing topics which have been asked in the Capgemini
off-campus/on-campus drives
Sample Essay:
Has social media made us less social? It indeed had a great influence on us.
Given the measure of its impact, it naturally attracted some criticism. While
social media has its own cons, it has only helped humans build new
relationships in this fast-paced world and stay more connected with it.
Well, Social media has been nothing more than a facilitator. A facilitator for
information flow. The amount of information and knowledge one can
accumulate through social media is immense. It has erased boundaries and
helped communities grow. It had made learning easy and efficient. While the
free flow of information might pose some long-term problems, the positives
outweigh the negatives.
The distance between people has a huge role in the level of communication
between them. It is hard to imagine the scenario if there weren’t any social
media. Thanks to social media this distance just got reduced to almost
nothing. You can keep up with the lives of people you care for, and always be
there for them. Social media made communication easy and efficient. It
made communication real-time, just like two people having a conversation.
If a kid is spending a lot of time on his computer, the parents have every
right to be concerned. But, chances are the kid is picking up skills relevant to
today’s tech world. Having said that, it is also equally important that one
develops the necessary people skills. There is definitely a concern around
the diminishing art of conversation, that needs to be addressed. Blaming
social media is definitely not one of the many possible solutions.
This is one way to answer Capgemini essay writing topics. You can
also share your essays for various topics in the comments sections
and get them evaluated by your friends
Capgemini Technical & HR Interview
Questions
Capgemini Interview Questions for Technical Round will be based on
subjects of your interest or based on projects you have done. You
need to have complete knowledge of all the projects you have listed down in
your resume. We are providing some links to help you prepare for Capgemini
Interview questions:
Most of you are confused between methods and functions. Functions, used in
C++, and methods, used in Java, have the same functionality with a minor
difference. Functions are a set of codes that are called in any part of the
program by referring to its name. Methods are a set of codes that are
called in any part of the program by referring to its name and these
are associated with an object.
There is no automatic coercion in Java, unlike C++. Coercion is to convert
one data type to another. In Java, coercion is explicitly made and is
performed using code instructions.
In Java, variables are not declared separately. They are the part of a class.
There’s no scope resolution operator (::) in Java. Java uses the dot for
everything but can get away with it since you can define elements only
within a class.
void: It is the return type of the method. Void defines the method that
doesn’t return any value.
In this, only the name of the string can be changed and the rest remains
constant.
4. Why is Java platform independent?
Java is created keeping in mind the concept of “write once run anywhere”. A
code once compiled, can run on any operating system as it uses the JVM. The
source code is converted into a bytecode by the Java compiler and then, the
JVM on the user’s system converts it into machine codes. As these machine
codes can run on any system irrespective of its underlying operating system,
it is platform independent.
An example for how the super keyword is used to access the data members
of a parent class is given below:
class Animal{
String color="white";
}
class Dog extends Animal{
String color="black";
void printColor(){
System.out.println(color);//prints color of Dog class
System.out.println(super.color);//prints color of Animal class
}
}
class TestSuper1{
public static void main(String args[]){
Dog d=new Dog();
d.printColor();
}}
class Animal{
void eat(){System.out.println("eating...");}
}
class Dog extends Animal{
void eat(){System.out.println("eating bread...");}
void bark(){System.out.println("barking...");}
void work(){
super.eat();
bark();
}
}
class TestSuper2{
public static void main(String args[]){
Dog d=new Dog();
d.work();
}}
From an event handling point of view, Swing components operate the same
as AWT components except that Swing provides a number of new event
types. Many Swing components don't have an AWT counterpart. A number of
new and exciting components are included in the Swing library that doesn't
exist in the AWT like tooltips, progress bars, trees, etc.
If any method throws checked Exception, then the user can either handle
this exception by using the try-catch block or they can re-throw it by
declaring another ‘throws’ clause during the declaration of methods.
The throw clause can be used in any part of the program like
throw
throw new Exception(“You have some exception”)
throw new IOException(“Connection failed!!”)
throws
throws IOException, NullPointerException, ArithmeticException
The above mentioned are some of the most asked Java interview questions.
List Interface:
The list interface is the ordered collection of objects in which you can store
duplicate values. In list interface, you can insert elements in desired
positions as it has insertion and positional access.
ArrayList:
Synchronization:
Vector:
Like ArrayList, Vector also implements List interface and uses insertion order.
But, unlike ArrayList, Vector is synchronized. Even though the adding,
searching, updating and deleting of arrays are not carried out satisfactorily
because of the synchronization, the vectors can grow and shrink as required
to accommodate elements. In the beginning, the using this vector class
object will create an initial capacity of m. If the (m+1) th element is added, the
size of the vector is doubled.
2. What is Polymorphism?
Poly in Greek means many and morph means forms. Polymorphism, in
simple words, is the ability of one function to take up many forms. In Java,
Polymorphism is the ability of the language to process objects of various
types and class through a single interface. For example, you will behave as a
customer in the shop, as a student in college, as an employee in the
workplace and as a fan in the stadium. Here, you are polymorphic.
Eg:
class DemoOverload{
public int add(int x, int y){ //method 1
return x+y;
}
public int add(int x, int y, int z){ //method 2
return x+y+z;
}
public int add(double x, int y){ //method 3
return (int)x+y;
}
public int add(int x, double y){ //method 4
return x+(int)y;
}
}
class Test{
public static void main(String[] args){
DemoOverload demo=new DemoOverload();
out.println(demo.add(2,3)); //method 1 called
out.println(demo.add(2,3,4)); //method 2 called
out.println(demo.add(2,3.4)); //method 4 called
out.println(demo.add(2.5,3)); //method 3 called
}
}
Eg:
class Car{
void run(){System.out.println("running");}
}
class Audi extends Car{
void run(){System.out.println("Running safely with 70km");
}
publicstatic void main(String args[]){
Car c = new Audi(); //upcasting
run();
}
}
Output:
In the above program, we created two classes called Car and Audi. The class
Audi, the child class, extends the parent class, Car. Then, the run method is
called by the reference variable of the parent class, i.e, c. Since it refers to
the child class’ object and also, as the child class’ method overrides the
Parent class method, the subclass method is invoked at runtime.
Eg:
class Shape{
void draw(){System.out.println("drawing...");}
}
class Rectangle extends Shape{
void draw(){System.out.println("drawing rectangle...");}
}
class Circle extends Shape{
void draw(){System.out.println("drawing circle...");}
}
class Triangle extends Shape{
void draw(){System.out.println("drawing triangle...");}
}
class TestPolymorphism2{
public static void main(String args[]){
Shape s;
s=new Rectangle();
draw();
s=new Circle();
draw();
s=new Triangle();
draw();
}
}
Output:
drawing rectangle...
drawing circle...
drawing triangle...
5. What is a Servlet?
Servlets and applets came into the picture as soon as the web was used for
delivering services. This is because the service providers recognized the
need for a more dynamic content. Hence, at first, the applets was developed.
It completely focused on using the client Platform to provide the dynamic
experience. At the same time, the servlets are developed to give the
dynamic experience from the server platform.
It processes the input from client side and generates the response in terms
of the HTML page, Applets or Javascript. The lifecycle of a servlet consists of
init( ), service( ), and destroy( ).
6. How is Multiple Inheritance supported in
Java?
Java supports multiple inheritance through its interfaces. The reason for not
supporting multiple inheritance through classes is to avoid the conflict and
complexity that arises due to it and keep Java a Simple Object-Oriented
Language.
InterfaceA.java
package com.faceprep.inheritance;
public interface InterfaceA {
public void xyz();
}
InterfaceB.java
package com.faceprep.inheritance;
public interface InterfaceB {
public void xyz();
}
Both the interfaces given above are declaring the same method. Now, an
interface extending both these interfaces is implemented.
InterfaceC.java
package com.faceprep.inheritance;
public interface InterfaceC extends InterfaceA, InterfaceB { //same method is
declared in both InterfaceA and InterfaceB
public void xyz();
}
The above program will generate a clean output because the interfaces are
only declaring the methods and the actual implementation will be done by
concrete classes implementing the interfaces. So there is no possibility of
any kind of ambiguity in multiple inheritance through interfaces.
1. Memory is allocated from the heap to hold all instance variables and
implementation-specific data of the object and its superclasses.
Implementation-specific data includes pointers to class and method data.
2. The instance variables of the objects are initialized to their default values.
3. The constructor for the most derived class is invoked. The first thing a
constructor does is call the constructor for its superclasses. This process
continues until the constructor for java.lang.The object is called, as
java.lang.The object is the base class for all objects in java.
4. Before the body of the constructor is executed, all instance variable
initializers and initialization blocks are executed. Then the body of the
constructor is executed. Thus, the constructor for the base class completes
first and constructor for the most derived class completes last.
These are few of the most commonly asked Java Interview questions.
C Interview Questions