SarthiQ

SarthiQ

Interview Preparation Guide

Cognizant
Questions & Answers

A comprehensive, expert-curated list of real interview questions to help you prepare effectively and land your dream job.

Document Details

Topic / Subject
Cognizant
Content Length
45 Curated Q&A
Generated On
October 4, 2026
Provided By
SarthiQ.com
Want to explore more questions & mock interviews? Click on 👉www.sarthiq.com
© 2026 SarthiQ Platform. All rights reserved.
www.sarthiq.com
Resume Upload Get Job in 90 Days Resume Builder AI Interview Coach Interview Questions Placement Committee Self Assessment Get Internship

Need Help?

[email protected]

Top Cognizant Interview Questions

NETFLIX
ORACLE
Adobe
NVIDIA
meta
IBM
wipro
TCS
cisco
intel
SAP
Uber

Cognizant Interview Questions

Practice with real Cognizant interview questions

01
A Backend Developer was asked
SarthiQ Cognizant
Medium
Asked in 2024
Q. Describe the Node.js event loop and how it handles asynchronous operations. Provide an example of using callbacks and Promises.
Ans. The Node.js event loop is a single-threaded model that allows the execution of non-blocking I/O operations. It uses an event-driven architecture to handle asynchronous operations, making it efficient for I/O-heavy applications. When an asynchronous operation like a file read is initiated, it is sent to the system kernel. Node.js continues execution while waiting for the operation to complete, and once it's done, the callback is added to the event queue. The event loop checks the queue and executes the callback when the call stack is empty. Using Callbacks:
javascript
const fs = require('fs');

console.log('Start reading file...');
fs.readFile('example.txt', 'utf8', (err, data) => {
    if (err) throw err;
    console.log('File contents:', data);
});
console.log('File read initiated...');
In the above example, readFile is non-blocking, and the console will show 'File read initiated...' before the contents of the file are printed. Using Promises:
javascript
const fs = require('fs').promises;

console.log('Start reading file...');
fs.readFile('example.txt', 'utf8')
    .then(data => console.log('File contents:', data))
    .catch(err => console.error(err));
console.log('File read initiated...');
Here, we use fs.promises which returns a Promise, allowing us to handle the result with then and catch, making the code cleaner and easier to read.
Backend DeveloperCore Concept
02
A Software Engineer was asked
SarthiQ Cognizant
Medium
Asked in 2024
Q. What are the key differences between REST and GraphQL API design, and when would you choose one over the other in a project?
Ans. REST (Representational State Transfer) APIs are designed around resources and use standard HTTP methods like GET, POST, PUT, and DELETE. Each endpoint corresponds to a specific resource, leading to multiple endpoints for different data needs. For example:
javascript
// REST API endpoint for fetching user data
GET /api/users/1
In contrast, GraphQL allows clients to request only the data they need through a single endpoint. This flexibility reduces over-fetching and under-fetching of data. For example:
graphql
query {
  user(id: "1") {
    name
    email
  }
}
You would choose REST when your application requirements are straightforward and the resource structure is stable. GraphQL is preferred for complex applications with varied data requirements, as it allows clients to tailor their requests. However, consider the learning curve, caching, and tooling available for each approach in your decision.
Software EngineerCore Concept
03
Frontend Developer
SarthiQ Cognizant
Hard

Question:

How would you design a scalable system for XYZ...

04
Software Engineer
SarthiQ Cognizant
Hard

Question:

How would you design a scalable system for XYZ...