CAPGEMINI PLACEMENT SAMPLE MATERIAL 2021
CAPGEMINI PLACEMENT SAMPLE MATERIAL 2021
1. Selection Process :-
Round 1:- Online Written Test
Round 2 :- Technical Interview
Round 3 :- HR Interview
2.Assessment Pattern :-
Pseudo Code :-
Questions : 30
Time : 30 Min
English Communication Test :-
Questions : 30
Time : 30 Min
Behavioral Test :-
Questions : 100 Min
Time : 20 Min
Game Test :-
Questions : 4 games out of 24
Time : 22-24 Min
Pseudo Code :-
Q1. What will be the output of the following pseudocode?
Integer i
Set i = 3
do
print i + 3
i = i - 1
while(i not equals 0)
end while
A) 6 6 6 B) 6 5 6 C) 5 5 5 D) 6 5 4
Ans: D
EXPLANATION:
Step 1: It will print i+3, here i value is 3. So i+3 is 6. On the next line, i will be decremented by 1. Then checking the conditions in do-while() i!=0. Here updated i value is 2 (2!=0),so condition is true. The loop continues.
Step 2: It will print i+3, here updated i value is 2. So i+3 is 5. On the next line i will be decremented by 1. Then checking the conditions in do-while() i!=0. Here updated i value is 1 (1!=0),so condition gets true. The loop continues
Step 3: It will print i+3, here updated i value is 1. So i+3 is 4. On the next line i will be decremented by 1. Then checking the condition in do while() i!=0. Here updated i value is 0 (0!=0),so condition gets false. Thus the loop gets terminated!
Q2. What would be the output of the following pseudocode?
Integer aString str1
Set str1 = “goose”
a = stringLength(str1)
Print (a ^ 1)
A) 0
B) 4
C) 5
D) 3
Ans: B
Explanation:
There are two variables a and str1. Value initialized for str1 is “goose”. On the next line, we are finding the length of str1 that is 5. Finally, printing the output of a bitwise exclusive OR operator with 1. And the answer is 4.
Q3. What would be the output of the following pseudocode?
Integer a, b, c
Set a = 8, b = 51, c = 2
c = (a ^ c)^ (a)
b = b mod 4
Print a + b + c
A. 13
B. 17
C. 26
D. 16
Post a Comment