The Pseudocode section is 5 questions in 10 minutes: short C-style (occasionally Python) snippets whose output you must predict. No compiler, no partial credit — you trace the code on paper. For candidates from non-CS branches this is the scariest section; for anyone who has practiced 50 snippets, it is a guaranteed full score.
What pseudocode questions test
- Loop tracing (while/for, integer division, digit extraction)
- Recursion (recursive sums, divide-and-multiply patterns)
- Logical vs bitwise operators (AND/OR on integers)
- Type conversion and format specifiers (float printed with %d)
- Conditionals and operator precedence
- Language basics — sizeof in C, floor division in Python
Practice Infosys pseudocode questions
All questions below are from memory-based Infosys papers. Trace first, then click an option to check yourself.
What will be the output for p = 3 and q = 4?
What will be the output?
What will be the output?
Method that works: make a variable table (columns = variables, rows = iterations) and update it line by line. Guessing from "what the code looks like it does" is exactly the trap these questions are built around.



