Get free ebooK with 50 must do coding Question for Product Based Companies solved
Fill the details & get ebook over email
Thank You!
We have sent the Ebook on 50 Must Do Coding Questions for Product Based Companies Solved over your email. All the best!

Capgemini Pseudocode Questions | Set 2

Last Updated on October 3, 2022 by Gokul Kannan

Capgemini Pseudocode Questions are available below on this page. Pseudo Code is a normal representation of algorithm code in C, C++, or any other language. In the Pseudo Code round, there will be a total of 30 questions that we need to answer within 30 minutes. The Difficulty level of the paper goes from Moderate to High. Pseudo-Code is not machine-readable code; it is just as same as algorithms written in coding format.

What will be the pattern of the pseudo-code round of Capgemini?

Capgemini pseudo code round is a 30-minute round and you get 30 questions in this round. The questions will be asked from C( input-output), C++, OPPs, and DSA.
The topics from DSA which are asked:

  • Array
  • Time Complexity
  • Trees
  • Linked list
  • Hashing, etc.

Capgemini Pseudocode Questions

1. What will be the output of the following pseudocode for a = 9, b = 7?
Integer funn(Integer a, Integer b)
Integer c
Set c = 2
b = b mod c
a = a mod c
return a + b
End function funn()

  • 2
  • 5
  • -5
  • 17

Answer: 2

2. What will be the output of the following pseudocode?
Integer a, b, c
Set a = 8, b = 6,c = 4
If(a > b)
a = b
Else
b = a
End If
If(c> b)
c = b
Else
b = c
End If
Print a + b + c

  • 13
  • 14
  • 17
  • 23

Answer: 14

3. What will be the output of the following pseudocode?
Integer a, b, c
Set a = 1, b = 1, c = 7
a = a + b
if(a + b)
if(b + (c ^ a))
a = 2
b = a
End if
End if
Print a + b + c

  • 6
  • 11
  • 22
  • 12

Answer: 11

4. What will be the output of the following pseudocode?
Integer p, q, r, s
Set p=1, q = 1
for (each r from 0 to 2 )
for (each s from -4 to -2 )
p = p + 2if(p > r)
Continue
End if
p = 1if(p > s)
Jump out of the loop
End if
End for
End for
Print p + q

  • 35
  • 13
  • 24
  • 20

Answer: 20

5. What will be the output of the following pseudocode for input a = 30, b = 60, and C = 90?
Integer a, b, c, sum
Read a, b, c
Set sum = a + b + c
if ((sum EQUALS 180) and (a NOT EQUALS 0) and (b NOT EQUALS 0) and (c NOT EQUALS 0))
Print " Success"
Otherwise
Print "Fail"
End if

  • Success
  • Fail
  • Error
  • None of the above

Answer: Success

6. What will be the output of the following pseudocode for a =1, b =2?

Integer funn(Integer a, Integer b )
if(a<3 && b<4)
return funn( a +1, b + 1)
Else
Return a + b
End if
End function funn()

  • 7
  • -7
  • 8
  • 19

Answer: 7

7. What will be the output of the following pseudocode for a = 2, b = 6?
Integer funn(Integer a, Integer b
If(a > 0)
If(b > 0)
Return a + b + funn(a + 1, 0) + funn(a + 2, 0) + funn(a + 3, 0)
End If
End If
Return a + b
End Function funn()

  • 21
  • 20
  • 17
  • 37

Answer: 20

8. What will be the output of the following pseudocode for a = 4, b = 6?
Integer funn(Integer a, Integer b)
If(a > 2)
If(b > 2)
Return a + b + funn(a + 1, b – 5)
End If
End If
Return a – b
End function funn()

  • 12
  • 14
  • 17
  • 22

Answer: 14

9. What will be the output of the following pseudo-code:
Integer p, q, r
Set p= 3, q =1, r = 2
If(p+ (2&2&2) && q + (3&3&3) && r + (2^2^2))
p = p – 2
q = p
Else
p = r
q = q2
End If
Print p+ q+ r

  • 8
  • 4
  • -8
  • 16

Answer: 4

10. What will be the output of the following pseudocode?
Integer p, q, r
Set p = 0, q = 4, r = 3
If(p || r)
If(p && r)
p = p &r
End If
p = pr
End If
Print p + q + r

  • 7
  • 10
  • 20
  • 12

Answer: 10

11. What will be the output of the following pseudocode for a = 4 and b = 9?

Integer funn(Integer a, Integer b)
If(a < b)
Return 1 + funn(a, b – 2)
End If
If(a^b > a&b)
Return a ^ b
Else
Return a & b
End If
Return 1
End function funn()

  • 10
  • -8
  • 14
  • 24

Answer: 10

12. What will be the output of the following pseudocode for a = 4, b = 6?
Integer funn(Integer a, Integer b)
If(a > 1)
Return a * funn (b – 6, a – 4)
Else
Return 1
End If
Return a + b
End function funn()

  • 0
  • 17
  • 4
  • 7

Answer: 4

13. What will be the output of the following pseudocode?
Integer p, q, r
Set q = 30, p = 10, r = 20
If (r > (r + p))
q = 1
Else
p = p – 2
r = r – 2
End If
If (r > (q + p) || 1)
q = (0 ^ 5)
Else
p = p + 2
r = p + 2
End If
Print p + q + r

  • 31
  • 20
  • 30
  • 40

Answer: 31

14. What will be the output of the following pseudocode?
Integer count
For (each count from 0 to 9)
Print "#"
If (count > 6)
CONTINUE
Print count
End For

  • 0#1#2#3#4#5#6#7#8#9#10
  • 0#1#2#3#4#5#6###
  • ‘#0#1#2#3#4#5##7#8#9#10
  • ‘#0#1#2#3#4#5#

Answer: #0#1#2#3#4#5#

15. What will be the output of the following pseudo-code:
Integer m
Set m = 0
Integer p[5] = {1, 1, 0, 1, 7}
If (p[0] && P[4])
m = p[1]
End If
If (p[2] && p[3])
m = p[2]
End If
Print m

  • 1
  • -5
  • 4
  • 18

Answer: 1

Capgemini Pseudocode Questions FAQs

1. What is a Pseudocode test?
Pseudocode is another round in the Infosys hiring process. There are a total of 30 questions and you have 30 minutes to complete the test. It is an MCQ question round where you have to predict the output of the code written in the pseudo-code format.

2. Pseudocode is mainly written in which programming language?
Pseudo-Codes are the language-free representation of the algorithm that explains the more coded format of the algorithm but not the complete representation of the code in any specific language.

3. How many Questions are there in Capgemini Pseudocode MCQs?
There are 30 questions that need to be solved within 30 mins.

4. What is the syllabus for Capgemini pseudocode round questions and Capgemini pseudocode questions and answers?
There is no such Syllabus for Capgemini pseudocode questions and answers but from what we have observed it has basic C input-output questions and a basic C Syllabus that was there first and we have given chapter-wise questions above please check them Capgemini Pseudocode Round Questions.

This article tried to discuss the Capgemini Pseudocode Questions. I hope this blog helps you understand and solve the problem. To practice more problems you can check out MYCODE | Competitive Programming at Prepbytes.

Leave a Reply

Your email address will not be published. Required fields are marked *