The Pseudo Code Round in Infosys placement drives (InfyTQ, HackWithInfy, or Off-Campus Hiring) tests how well you understand logic, flow, and conditions in code.
You don’t need to write code — you just need to trace what the code does.
Below, you’ll find the latest Infosys Pseudo Code questions (2025–26) taken directly from practice material and actual patterns. Each question has options and answers verified twice for accuracy.
Infosys Pseudocode Section Overview
| Details | Description |
|---|---|
| Total Questions | 5 |
| Time Limit | 10 minutes |
| Question Type | Output-based Logical Pseudocode |
| Difficulty Level | Easy to Moderate |
| Topics Covered | Loops, Conditions, Operators, Number Logic |
Top Infosys Pseudocode Questions (With Answers)
Q1.
a = 5
b = 10
c = 15
if(a + b > c)
print("A")
else if(b + c > a)
print("B")
else
print("C")
Options:
a) A
b) B
c) C
d) Error
Answer: b) B
Explanation:
- (a+b > c) → 15 > 15 → False
- (b+c > a) → 25 > 5 → True → Prints B
Q2.
a = 10
b = 20
if(a < b and b < 30)
print("True")
else
print("False")
Options:
a) True
b) False
c) 30
d) 10
Answer: a) True
Explanation: Both conditions are true, so output = True.
Q3.
count = 0
for i = 1 to 5
for j = 1 to i
count = count + 1
print(count)
Options:
a) 10
b) 15
c) 5
d) 25
Answer: b) 15
Explanation: Runs 1+2+3+4+5 = 15 times → count = 15.
Q4.
a = 0
for i = 1 to 5
a = a + i
print(a)
Options:
a) 10
b) 15
c) 20
d) 25
Answer: b) 15
Explanation: Sum = 1+2+3+4+5 = 15.
Q5.
a = 10
b = 20
c = 30
if(a > b and a > c)
print(a)
else if(b > a and b > c)
print(b)
else
print(c)
Options:
a) 10
b) 20
c) 30
d) None
Answer: c) 30
Explanation: Largest number among a,b,c → 30.
Q6.
a = 5
b = 3
for i = 1 to b
a = a + b
print(a)
Options:
a) 8
b) 11
c) 14
d) 15
Answer: c) 14
Explanation: Adds 3 three times → 5 + 3×3 = 14.
Q7.
num = 5
fact = 1
for i = 1 to num
fact = fact * i
print(fact)
Options:
a) 60
b) 100
c) 120
d) 24
Answer: c) 120
Explanation: 1×2×3×4×5 = 120 → factorial of 5.
Q8.
a = 4
b = 2
for i = 1 to b
a = a * b
print(a)
Options:
a) 4
b) 8
c) 12
d) 16
Answer: d) 16
Explanation: a=4→8→16 after 2 iterations.
Q9.
a = 10
b = 5
if(a % b == 0)
print(a / b)
else
print(a * b)
Options:
a) 2
b) 5
c) 10
d) 50
Answer: a) 2
Explanation: 10 % 5 == 0 → prints a/b = 2.
Q10.
a = 2
b = 3
for i = 1 to 3
a = a * b
print(a)
Options:
a) 18
b) 27
c) 36
d) 54
Answer: d) 54
Explanation: a=2×3×3×3=54.
Q11.
a = 5
b = 10
c = 0
for i = 1 to b
c = c + a
print(c)
Options:
a) 10
b) 25
c) 50
d) 100
Answer: c) 50
Explanation: Adds 5 ten times → 50.
Q12.
sum = 0
for i = 1 to 10
if(i % 2 == 0)
sum = sum + i
print(sum)
Options:
a) 20
b) 25
c) 30
d) 35
Answer: c) 30
Explanation: 2+4+6+8+10 = 30.
Q13.
a = 2
b = 5
for i = 1 to b
if(i % 2 == 0)
a = a + i
print(a)
Options:
a) 5
b) 7
c) 8
d) 10
Answer: c) 8
Explanation: Adds even i → 2+2+4=8.
Q14.
a = 0
for i = 1 to 4
for j = 1 to 3
a = a + 1
print(a)
Options:
a) 9
b) 10
c) 12
d) 15
Answer: c) 12
Explanation: 4×3 = 12.
Q15.
num = 6
for i = 1 to num
if(num % i == 0)
print(i)
Options:
a) 1, 2, 3, 6
b) 2, 3, 4, 6
c) 1, 3, 6
d) 2, 4, 6
Answer: a) 1, 2, 3, 6
Explanation: Divisors of 6.
Q16.
for i = 1 to 5
for j = 1 to i
print("*")
Options:
a) *****
b) Pyramid Pattern
c) Right-Angle Triangle
d) Half Pyramid
Answer: d) Half Pyramid
Explanation: Prints * pattern of height 5.
Q17.
sum = 0
for i = 1 to 100
sum = sum + i
print(sum)
Options:
a) 100
b) 5050
c) 5000
d) 5500
Answer: b) 5050
Explanation: Sum of 1–100 = n(n+1)/2 = 5050.
Q18.
a = 0
for i = 1 to 10
if(i % 3 == 0)
a = a + i
print(a)
Options:
a) 15
b) 18
c) 21
d) 24
Answer: b) 18
Explanation: 3+6+9 = 18.
Q19.
num = 153
sum = 0
temp = num
while temp > 0
digit = temp % 10
sum = sum + (digit * digit * digit)
temp = temp // 10
if(sum == num)
print("Armstrong")
else
print("Not Armstrong")
Options:
a) Armstrong
b) Not Armstrong
c) Error
d) Infinite Loop
Answer: a) Armstrong
Explanation: 153 = 1³ + 5³ + 3³ → Armstrong number.
Q20.
num = 1234
rev = 0
while(num > 0)
digit = num % 10
rev = rev * 10 + digit
num = num // 10
print(rev)
Options:
a) 1234
b) 4321
c) 3412
d) 2143
Answer: b) 4321
Explanation: Reverses digits → 4321.
Key Tips to Crack Infosys Pseudocode Section
- Understand flow, not syntax — It’s not about code language, it’s about logic.
- Practice loop tracing — Most questions use nested loops or conditions.
- Watch out for tricky conditions —
if-elseorder changes the output. - Run dry tests manually — simulate each line step by step.
- Time management: 5 questions, 10 minutes = 2 min per question.
Final Advice:
The Infosys Pseudocode Round is a scoring opportunity if you master logic-based questions.
All the 20+ questions and answers above are verified twice from the official Infosys pattern.
With regular practice, you can easily secure a 90%+ accuracy in this section.