Capgemini 2025 Papers
Latest papers. View 2025 Papers →
Capgemini placement papers 2024 with actual pseudocode questions, hands-on coding problems, and solutions from the 2024 recruitment cycle.
This page contains actual Capgemini placement papers from 2024 with 40+ questions from game-based assessment and hands-on coding round.
| Round | Questions | Time | Difficulty |
|---|---|---|---|
| Game-Based (Pseudocode) | 15 MCQs | 25 min | Medium |
| Hands-on Coding | 2 problems | 45 min | Easy-Medium |
| Technical Interview | - | 30-45 min | Medium |
| HR Interview | - | 20-30 min | Easy |
SET i = 0WHILE i < 5 PRINT i SET i = i + 2END WHILEAnswer: 0 2 4
Explanation: Loop runs with i = 0, 2, 4 (stops when i = 6)
SET arr = [1, 2, 3, 4, 5]SET sum = 0FOR i FROM 0 TO 4 SET sum = sum + arr[i]END FORPRINT sumAnswer: 15
Explanation: Sum of array elements = 1+2+3+4+5 = 15
SET x = 5, y = 10IF x > y THEN PRINT xELSE IF x == y THEN PRINT 0ELSE PRINT yEND IFAnswer: 10
Explanation: Since x < y, the ELSE branch executes
FOR i FROM 1 TO 3 FOR j FROM 1 TO 2 PRINT i * j END FOREND FORAnswer: 6 times
Explanation: 3 outer iterations × 2 inner iterations = 6
FUNCTION double(x) RETURN x * 2END FUNCTION
SET a = 5SET b = double(a)PRINT bAnswer: 10
Explanation: double(5) returns 5 × 2 = 10
SET str = "Hello"SET count = 0FOR i FROM 0 TO LENGTH(str) - 1 SET count = count + 1END FORPRINT countAnswer: 5
Explanation: Counts each character in “Hello”
FUNCTION factorial(n) IF n <= 1 THEN RETURN 1 END IF RETURN n * factorial(n - 1)END FUNCTIONPRINT factorial(4)Answer: 24
Explanation: 4! = 4 × 3 × 2 × 1 = 24
SET arr = [1, 2, 3, 4]SET n = 4FOR i FROM 0 TO n/2 - 1 SET temp = arr[i] SET arr[i] = arr[n - 1 - i] SET arr[n - 1 - i] = tempEND FORAnswer: [4, 3, 2, 1]
Explanation: Swaps first with last, second with second-last
SET n = 7, isPrime = TRUEFOR i FROM 2 TO n - 1 IF n MOD i == 0 THEN SET isPrime = FALSE END IFEND FORPRINT isPrimeAnswer: TRUE
Explanation: 7 is not divisible by 2-6
SET arr = [3, 1, 4, 1, 5, 9, 2]SET max = arr[0]FOR i FROM 1 TO 6 IF arr[i] > max THEN SET max = arr[i] END IFEND FORPRINT maxAnswer: 9
Explanation: Finds maximum element in array
Difficulty: Easy
Time: 15 minutes
Reverse a given string without using built-in functions.
Input: “capgemini”
Output: “inigempaC”
#include <string.h>void reverse(char str[]) { int n = strlen(str); for (int i = 0; i < n/2; i++) { char temp = str[i]; str[i] = str[n-1-i]; str[n-1-i] = temp; }}public String reverse(String s) { char[] arr = s.toCharArray(); int left = 0, right = arr.length - 1; while (left < right) { char temp = arr[left]; arr[left++] = arr[right]; arr[right--] = temp; } return new String(arr);}def reverse_string(s): chars = list(s) left, right = 0, len(chars) - 1 while left < right: chars[left], chars[right] = chars[right], chars[left] left += 1 right -= 1 return ''.join(chars)Difficulty: Easy
Time: 15 minutes
Check if a string is palindrome (ignore case and spaces).
Input: “A man a plan a canal Panama”
Output: true
public boolean isPalindrome(String s) { s = s.toLowerCase().replaceAll("[^a-z0-9]", ""); int left = 0, right = s.length() - 1; while (left < right) { if (s.charAt(left++) != s.charAt(right--)) { return false; } } return true;}def is_palindrome(s): s = ''.join(c.lower() for c in s if c.isalnum()) return s == s[::-1]Difficulty: Easy
Time: 15 minutes
Check if a number is Armstrong (sum of cubes of digits equals number for 3-digit).
Input: 153
Output: true (1³ + 5³ + 3³ = 153)
int isArmstrong(int n) { int original = n, sum = 0, digits = 0, temp = n; while (temp > 0) { digits++; temp /= 10; } temp = n; while (temp > 0) { int digit = temp % 10; int power = 1; for (int i = 0; i < digits; i++) power *= digit; sum += power; temp /= 10; } return sum == original;}def is_armstrong(n): digits = str(n) power = len(digits) return sum(int(d) ** power for d in digits) == nDifficulty: Easy
Time: 15 minutes
Print first n Fibonacci numbers.
Input: n = 7
Output: 0 1 1 2 3 5 8
void fibonacci(int n) { int a = 0, b = 1; for (int i = 0; i < n; i++) { printf("%d ", a); int temp = a + b; a = b; b = temp; }}public void fibonacci(int n) { int a = 0, b = 1; for (int i = 0; i < n; i++) { System.out.print(a + " "); int temp = a + b; a = b; b = temp; }}def fibonacci(n): a, b = 0, 1 for _ in range(n): print(a, end=" ") a, b = b, a + bDifficulty: Easy
Time: 10 minutes
Count vowels and consonants in a string.
Input: “Capgemini”
Output: Vowels: 4, Consonants: 5
public int[] countVowelsConsonants(String s) { int vowels = 0, consonants = 0; s = s.toLowerCase(); for (char c : s.toCharArray()) { if (Character.isLetter(c)) { if ("aeiou".indexOf(c) >= 0) vowels++; else consonants++; } } return new int[]{vowels, consonants};}def count_vowels_consonants(s): vowels = consonants = 0 for c in s.lower(): if c.isalpha(): if c in 'aeiou': vowels += 1 else: consonants += 1 return vowels, consonantsCapgemini 2025 Papers
Latest papers. View 2025 Papers →
Capgemini Coding Questions
25+ problems. View Coding →
Capgemini Preparation Guide
Complete strategy. View Guide →
Complete Guide
Full guide. View Guide →
Master pseudocode - it’s the key to clearing Capgemini!
Last updated: February 2026