Cognizant Automata Fix: Questions, Pattern, and Prep Guide
Cognizant uses AMCAT Automata Fix to screen GenC applicants. Here's the question pattern, two fully traced debugging examples, and a four-week prep plan.
Cognizant’s GenC online test uses AMCAT Automata Fix to screen debugging ability. The section appears before the technical interview, so a poor Automata Fix score ends the application at the screening stage.
This guide covers where Automata Fix sits in the Cognizant GenC pipeline, what the three question types look like, two fully traced debugging examples, and a four-week prep approach.
How Automata Fix Fits the Cognizant GenC Pipeline
The GenC recruitment process runs in stages: online test, technical interview, HR interview. The online test combines an aptitude section, a verbal section, and a coding section that includes Automata Fix. Clearing the online test is the gate to the interview rounds.
For the full aptitude section pattern, the Cognizant aptitude test guide covers the quantitative and reasoning sections in detail.
Cognizant runs two main fresher tracks with different expectations:
| Track | CTC Band | Entry Requirement |
|---|---|---|
| GenC (standard) | ₹4.0 to 4.5 LPA | Aptitude + Automata Fix + HR |
| GenC Elevate / GenC Pro | ₹6.5 to 9.0 LPA | Higher coding bar + project review |
According to CIOL’s coverage of Cognizant’s workforce strategy, Cognizant plans to hire up to 25,000 fresh graduates in 2026 as AI drives a broader pyramid workforce model. The GenC program remains the primary entry route, with the Graduate Program 2026 offering structured training, real project exposure, and defined career paths.
The Automata Fix section is not a bonus module. It is a screening gate for both tracks.
Cognizant is one of many companies that use AMCAT as their online test platform. The guide to companies hiring through AMCAT, eLitmus, and CoCubes lists the full set of platforms and companies if you are preparing across multiple drives simultaneously.
The Three Question Types in Automata Fix
The AMCAT Automata Fix deep-dive guide covers all three question types with worked examples and the grader evaluation framework. The short version:
| Question Type | What It Tests | Common Defects |
|---|---|---|
| Syntax error | Compiler-level rules | Malformed includes, wrong data types in switch, missing parens |
| Logical error | Execution-level reasoning | Off-by-one, wrong operator, unsigned int wrap, stray semicolon |
| Code reuse | Implementation against a scaffold | Completing missing functions that integrate with given helper code |
Each type requires a different diagnostic approach. Syntax errors are confirmed the moment the code fails to compile. Logical errors require tracing execution state. Code reuse questions require reading the scaffold’s function signatures before writing any implementation.
The AMCAT platform, administered by SHL India, allows you to compile and run code multiple times before final submission. Use that. A fix that passes the example input in the problem statement may still fail on boundary cases.
Cognizant Automata Fix: Two Worked Examples
Work through each problem before reading the solution. Pattern recognition builds through practice, not through reading.
Example 1: Syntax Error (Greatest of Three Numbers)
Buggy code:
#include <stdio.h>
int main() {
int num1, num2, num3;
scanf("%d %d %d", &num1, &num2, &num3);
if (num1 > num2) && (num1 > num3) {
printf("%d", num1);
}
else if (num2 > num3) {
printf("%d", num2);
}
else {
printf("%d", num3);
}
return 0;
}
What to find: The if condition is broken. The compiler parses if (num1 > num2) as a complete condition (parentheses balance after the second )) and then encounters && (num1 > num3) { as stray tokens it cannot parse. This is a compile-time syntax error.
Fix: Wrap the entire compound condition in one pair of outer parentheses.
if ((num1 > num2) && (num1 > num3)) {
Manual trace:
- Input
5 3 4:((5 > 3) && (5 > 4))= true, prints5. Correct. - Input
2 7 4:((2 > 7) && (2 > 4))= false;else if (7 > 4)= true, prints7. Correct. - Input
2 3 8: both conditions false;elseprints8. Correct.
One missing outer parenthesis. One character change. That is the profile of most Automata Fix syntax errors.
Example 2: Logical Error (Unsigned Int Wrap-Around)
Buggy code:
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
unsigned int i = n;
while (i >= 0) {
printf("%d\n", i);
i--;
}
return 0;
}
What to find and fix:
unsigned intvalues are always greater than or equal to zero by definition.- When
iis 0 andi--executes,iwraps to UINT_MAX (4,294,967,295on 32-bit systems) rather than going to -1. - The condition
i >= 0is permanently true. The loop never terminates. - Fix: change
unsigned int i = ntoint i = n.
Manual trace with fix, input 3:
- i = 3: condition
3 >= 0true, prints3, i = 2 - i = 2: condition
2 >= 0true, prints2, i = 1 - i = 1: condition
1 >= 0true, prints1, i = 0 - i = 0: condition
0 >= 0true, prints0, i = -1 (signed, legal) - i = -1: condition
-1 >= 0false, loop terminates
Output: 3 2 1 0. Correct.
The diagnostic pattern to remember: whenever a loop condition tests >= 0 and the loop counter decrements, check whether the counter’s declared type is unsigned. If it is, that line is the bug.
Preparation Plan: Four Weeks to Automata Fix Readiness
Week 1: Build the code-reading reflex
Read code you did not write. Take programs from your own coursework and introduce one deliberate defect each: a stray semicolon after a loop header, an unsigned variable in a decremental loop, a missing parenthesis in a compound condition. Diagnose and fix them. Do this 15 to 20 times across C and Java.
The goal is not writing code. It is training your eye to spot the line that does not behave as the surrounding code expects.
Week 2: Syntax error drills
Work through 20 to 30 syntax-error exercises. HackerRank’s Bug Fixing challenge set is a reliable source. Focus areas: malformed #include directives, data type violations in switch statements, brace and parenthesis mismatches, format specifier errors in scanf/printf.
Week 3: Logical error and code completion
For logical errors, trace execution on paper before running the code. Write the variable values at each iteration for both the broken and fixed versions, then confirm they match the expected output.
For code reuse questions, read every declared function signature in the scaffold before writing one line. The return type, argument types, and function name must match exactly. Writing a standalone solution that bypasses the scaffold’s helpers will not match the expected output.
Week 4: Timed practice
By Week 4, aim to identify the bug type within 60 seconds of reading the code. That speed comes from having seen each pattern before, not from reading faster.
After each timed set, classify mistakes: did not recognise the bug type; recognised it but made the wrong fix; correct fix but took too long. Each class points to a different drill for the next session.
For broader AMCAT test preparation across all sections, including the quantitative and logical reasoning modules that appear alongside Automata Fix in the full Cognizant online test, the AMCAT test preparation guide covers each section systematically.
The Debugging Habit and What It Builds Toward
The two examples above illustrate the same underlying skill: reading a type declaration and tracing what it implies about runtime behavior. The unsigned int example required knowing that unsigned types wrap at zero, not underflow to -1. That is type-system reasoning applied to a small, contained problem.
The same reasoning applies at larger scales. Reading an LLM prompt chain and identifying why a model produces unexpected output given a specific input context is structurally the same task: read the “code” (the prompt), identify which token or instruction produces the divergence, and make a targeted correction. The 2026 AI roadmap for Indian engineering students maps where that instinct takes you as a career path.
For students who want to test that territory before committing, TinkerLLM is a self-paced LLM playground at ₹299.
Clear the Automata Fix section first. The instinct transfers.
Primary sources
Frequently asked questions
Does Cognizant still use Automata Fix in 2026?
Yes. Cognizant uses AMCAT Automata Fix as part of its GenC online test. The section screens debugging ability before candidates reach the technical interview stage.
How many Automata Fix questions appear in the Cognizant online test?
The Automata Fix section typically includes three questions, one per type: a syntax error, a logical error, and a code reuse question. The exact configuration can vary by campus recruitment drive.
What languages can I use in Cognizant's Automata Fix section?
The AMCAT Automata Fix section supports C, C++, and Java. Python is not available for Automata Fix, unlike the standard AMCAT Automata section.
What is the cut-off for the Automata Fix section in Cognizant GenC?
Cognizant does not publicly disclose section-level cut-offs. The general expectation is that you solve at least the syntax-error and logical-error questions fully to clear the screening threshold.
How is Automata Fix different from Automata in Cognizant's test?
Standard AMCAT Automata asks you to write code from scratch given a problem statement. Automata Fix gives you existing broken code and asks you to identify and correct the defect. Different skill, different prep.
Can I compile and run code in Cognizant's Automata Fix section?
Yes. The AMCAT test environment allows you to compile and run the code multiple times before final submission. Using print statements to trace variable values is permitted.
A self-paced playground for building with LLMs.
TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.
Try TinkerLLM (₹299 launch)