Cognizant interview questions and process for freshers
Cognizant hires freshers into tracks such as GenC, GenC Next and GenC Pro. Here is how its process commonly works, the questions freshers report most, and how to prepare for free.
Practise a Cognizant-style mock interview with Sam
Sam, our AI interviewer, asks Cognizant-style questions out loud, follows up on your answers and gives you an honest scorecard. Free to start.
How the Cognizant interview usually goes
Based on what candidates commonly report. The process changes by year, role and campus, so always check the official Cognizant careers page and your drive's notification.
- 1
Online test
Commonly aptitude, reasoning and verbal ability, with coding questions for the higher tracks. The track names and patterns change, so check the current drive's details.
- 2
Technical interview
Programming basics, SQL queries, OOP and your project; higher tracks report more coding and problem solving.
- 3
HR interview
Background, relocation and shifts, and why Cognizant. Sometimes combined with the technical round.
Technical questions freshers are commonly asked
Cognizant technical interviews for freshers usually stay on fundamentals: your project, one programming language, OOP, DBMS and SQL, and some OS and networking basics, plus a short program to write or explain. Clear, confident communication counts as much as depth. SQL comes up often, so practise writing queries, not just definitions.
- Q1.
Explain your final-year (or best) project.
Cover the problem, your own part, the tech stack and why you chose it, one hard bug or decision, and what you would improve. Expect follow-ups on anything you name, so only list what you can defend.
- Q2.
What are the four pillars of OOP?
Encapsulation (keeping data and the methods that use it together, and hiding internal state), abstraction (exposing what an object does, not how), inheritance (a class reusing and extending another) and polymorphism (one interface, many forms). Give a small example in the language you know best.
- Q3.
What is the difference between method overloading and overriding?
Overloading is the same method name with different parameter lists, usually in the same class, and is resolved at compile time. Overriding is a subclass redefining a parent method with the same signature, resolved at runtime (runtime polymorphism).
- Q4.
Abstract class vs interface: when would you use each?
An abstract class can hold fields, constructors and both abstract and concrete methods, and (in Java) a class can extend only one. An interface is a contract a class can implement many of; since Java 8 it can have default and static methods but no instance state. Use an abstract class for a shared base, an interface for a capability.
- Q5.
In Java, what is the difference between == and .equals()?
For objects, == checks whether two references point to the same object, while .equals() checks logical equality as defined by the class (String compares characters). For primitives, == compares values.
- Q6.
What is the difference between a primary key and a foreign key?
A primary key uniquely identifies each row and cannot be NULL; a table has one. A foreign key is a column that refers to a primary (or unique) key in another table, enforcing referential integrity; it can repeat and, unless declared NOT NULL, can be NULL.
SQL basics - Q7.
Explain the types of SQL joins.
INNER JOIN returns rows that match in both tables; LEFT JOIN returns every row of the left table plus matches (NULLs where none); RIGHT JOIN is the mirror; FULL OUTER JOIN returns all rows from both. A self join joins a table to itself, such as employees to their managers.
Joins explained - Q8.
Write a SQL query to find the second-highest salary.
Take the maximum salary below the overall maximum. With window functions, DENSE_RANK() handles ties and generalises to the Nth highest.
Subqueries & CTEsSELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees); - Q9.
What is the difference between WHERE and HAVING?
WHERE filters individual rows before grouping; HAVING filters groups after GROUP BY and can use aggregates, for example HAVING COUNT(*) > 5.
GROUP BY & aggregates - Q10.
DELETE vs TRUNCATE vs DROP?
DELETE removes rows (optionally with a WHERE clause) one by one. TRUNCATE removes all rows quickly without a WHERE clause. DROP removes the whole table, structure and data. Whether TRUNCATE can be rolled back depends on the database, so say that rather than guessing.
- Q11.
What is normalisation? Explain 1NF, 2NF and 3NF.
Normalisation organises tables to reduce duplicate data and update anomalies. 1NF: every column holds atomic values, no repeating groups. 2NF: 1NF and no non-key column depends on only part of a composite key. 3NF: 2NF and no non-key column depends on another non-key column (no transitive dependency).
- Q12.
What is the difference between a process and a thread?
A process is a running program with its own memory space. Threads run inside a process and share its memory (code, heap) while each has its own stack and registers, so they are cheaper to create and switch, but shared data needs synchronisation.
Processes vs threads - Q13.
Reverse a string without using a built-in reverse function.
Use two pointers at the start and end, swap the characters and move both inward until they meet: O(n) time. In languages with immutable strings (Java, Python) convert to a character array or list first.
Two pointers from both ends - Q14.
Check whether a string (or number) is a palindrome.
Compare characters from both ends moving inward; stop at the first mismatch. For a number, reverse its digits and compare with the original. Ask whether case, spaces and punctuation should be ignored.
Two pointers from both ends - Q15.
Find the missing number in an array containing 1 to n with one number missing.
Subtract the array's sum from the expected sum n(n+1)/2, or XOR all values with all numbers 1 to n; the XOR version avoids overflow. Both are O(n) time and O(1) space.
Bit manipulation - Q16.
Print the Fibonacci series, or find the factorial of a number, iteratively and recursively.
Know both versions and their trade-offs: the recursive version needs a base case and uses stack space, and naive recursive Fibonacci is exponential because it recomputes values. A loop (or memoization) makes Fibonacci O(n).
Recursion basics - Q17.
Array vs linked list: when would you use each?
Arrays store elements contiguously, so access by index is O(1) but inserting in the middle shifts elements. Linked lists insert or delete in O(1) once you have the node, but access is O(n) and each node needs extra memory for pointers.
Linked list basics
Cognizant HR interview questions
- 1.
Tell me about yourself.
60 to 90 seconds: your degree, one or two projects or skills that fit the role, and what you want next. Don't read out your resume.
Tell me about yourself - 2.
Why should we hire you?
Match two or three of your strengths to the role, each backed by proof such as a project, an internship or a result.
- 3.
What are your strengths and weaknesses?
Pick a real strength with an example, and a real but non-critical weakness along with what you are doing to improve it.
- 4.
Why Cognizant?
Mention something specific: the domains Cognizant works in (such as healthcare or banking), its training for freshers, or the track you applied for and why.
- 5.
Are you willing to relocate and work in shifts?
Answer honestly. Services companies place freshers on projects in different cities and time zones; if you have a genuine constraint, say so politely.
- 6.
Where do you see yourself in five years?
Talk about growing your skills and responsibility in a way that could plausibly happen at this company, not about leaving it.
- 7.
Tell me about a challenge you faced and how you handled it.
Use STAR: the situation, your task, the actions you took and the result, with the focus on what you did.
The STAR method - 8.
Tell me about a time you disagreed with a teammate.
Show that you listened, argued with facts and kept the team moving; end with what you learned.
Conflict & teamwork - 9.
Your branch isn't computer science. Why IT?
Common for ECE, EEE and mechanical students. Show genuine interest with evidence: courses you took, programs or projects you built, and what you enjoy about software.
- 10.
Do you have any questions for us?
Always ask one or two, for example about training, the team you would join, or what a good first year looks like.
Questions to ask the interviewer
How to prepare for the Cognizant interview
- 1.
Clear the online test first
The online test decides your track, so aptitude and coding practice both pay off. Practise aptitude a little every day with timed quizzes: percentages, profit and loss, time and work, number series and seating arrangements come up often.
Aptitude practice - 2.
Make practice a daily habit
Five questions a day adds up. The Daily Quiz takes about three minutes and needs no login.
Daily Quiz - 3.
Revise core CS
OOP, DBMS and SQL, operating systems and networking basics. Aim to explain each concept in two or three sentences with an example.
Study notes - 4.
Know your project inside out
Your role, the tech stack and why, the database design, one problem you solved. Most fresher interviews spend a lot of time here.
- 5.
Write small programs by hand
Strings, arrays and number programs (reverse, palindrome, prime, Fibonacci) in one language you know well, without an IDE, then trace them with an example.
- 6.
Practise speaking out loud
Rehearse "tell me about yourself" and your project explanation. A Cognizant-style mock interview with Sam is a safe place to practise.
Tell me about yourself - 7.
Check the official details
Eligibility rules, test patterns and hiring tracks change from year to year. Read the official Cognizant careers page and the drive notification for your batch.
Practise a Cognizant-style mock interview with Sam
Sam, our AI interviewer, asks Cognizant-style questions out loud, follows up on your answers and gives you an honest scorecard. Free to start.
Frequently asked questions
What is Cognizant GenC?
GenC is the name Cognizant uses for its fresher hiring tracks, with higher tracks such as GenC Next and GenC Pro for candidates who do better in coding. Track names and criteria change, so check Cognizant's official careers page.
Does Cognizant ask SQL questions?
Often. Expect joins, primary and foreign keys, GROUP BY with HAVING and classic queries like the second-highest salary. Practise writing them by hand.
Which programming language should I use in the Cognizant interview?
Use the language you know best and listed on your resume. C, C++, Java and Python are all common; what matters is writing correct programs and explaining them clearly.
Can I practise a Cognizant-style mock interview?
Yes. On InterviewSam you can set Cognizant as the target company and Sam, our AI interviewer, runs a mock interview by voice in that style, then gives you an honest scorecard. You need a free account; the study notes and aptitude practice need no login.
InterviewSam is not affiliated with Cognizant. This page summarises commonly reported interview experiences to help you prepare; for eligibility, test patterns and dates, rely on Cognizant's official careers page.