Filter interviews by
I applied via Approached by Company and was interviewed before May 2023. There was 1 interview round.
Promise is an object representing the eventual completion or failure of an asynchronous operation.
Promises are used to handle asynchronous operations in JavaScript.
A Promise can be in one of three states: pending, fulfilled, or rejected.
Promises can be chained using .then() method to handle success and failure.
Example: new Promise((resolve, reject) => { ... }).then(result => { ... }).catch(error => { ... });
Callback is a function passed as an argument to another function to be executed later. Async await is a syntax for writing asynchronous code in a synchronous manner.
Callback is used in event handling, asynchronous programming, and more.
Async await is a modern way to write asynchronous code in a synchronous style.
Example: Callback - setTimeout function in JavaScript.
Example: Async await - fetching data from an API in Ja
Hoisting is a JavaScript behavior where variable and function declarations are moved to the top of their containing scope during the compilation phase.
Variable and function declarations are hoisted to the top of their scope.
Only declarations are hoisted, not initializations.
Function declarations take precedence over variable declarations.
Example: console.log(x); var x = 5; // Output: undefined
Event loop is a mechanism in programming that allows for asynchronous execution of code.
Event loop is commonly used in JavaScript to handle asynchronous operations.
It allows for non-blocking I/O operations by continuously checking the event queue.
Event loop ensures that the program does not get stuck waiting for a single operation to complete.
EventEmitter is a class in Node.js that allows multiple functions to be attached to an event and triggered when the event is emitted.
EventEmitter is a core module in Node.js that allows communication between objects in a loosely coupled way.
It is used for handling events in Node.js applications.
Listeners can be attached to EventEmitter instances using the 'on' method and events can be emitted using the 'emit' method.
Ex...
Request and Response objects are created in Node.js using the 'http' module.
Require the 'http' module in your code
Use the 'http.createServer()' method to create a server
Access the request and response objects in the callback function
let, var, and const are all used to declare variables in JavaScript, but they have different scopes and behaviors.
let: block-scoped variable, can be reassigned
var: function-scoped variable, can be reassigned
const: block-scoped variable, cannot be reassigned, but its properties can be modified
No, you cannot declare a variable with the same name using var keyword.
Variables declared with var keyword can only be declared once within the same scope
Attempting to declare a variable with the same name using var will result in a syntax error
Middleware is software that acts as a bridge between different applications or components, allowing them to communicate and work together.
Middleware facilitates communication between different software components
It can handle tasks such as data conversion, security, and logging
Examples include message brokers like RabbitMQ, web servers like Apache Tomcat, and API gateways like Kong
Debugging memory leaks involves identifying the source of the leak and fixing it to free up memory.
Use memory profiling tools like Valgrind or Instruments to detect memory leaks
Check for unreleased memory allocations in the code
Look for circular references or retain cycles in object-oriented programming languages
Use tools like LeakSanitizer in C/C++ programs to detect memory leaks
Review code for potential memory leaks,
I applied via Referral and was interviewed before May 2023. There were 2 interview rounds.
Top trending discussions
I know multiple programming languages including Java, Python, and C++.
Proficient in Java with experience in developing web applications using Spring framework
Familiar with Python for data analysis and machine learning
Experience in C++ for developing high-performance applications
Also familiar with HTML, CSS, and JavaScript for front-end development
Class is a blueprint for creating objects, encapsulation is the process of hiding data and methods within a class.
Class is a template or blueprint that defines the properties and behaviors of an object.
Encapsulation is the process of bundling data and methods together within a class, hiding the internal details from the outside world.
Other features of OOP include inheritance, polymorphism, and abstraction.
Inheritance a...
Program to find the sum of squares of each term of Fibonacci series
Generate Fibonacci series using loop or recursion
Calculate square of each term
Add all squares to get the sum
I would like to join Cognizant because of its reputation as a leading global technology and consulting company.
Cognizant has a strong presence in the industry and is known for its innovative solutions.
I am impressed by Cognizant's commitment to digital transformation and its ability to deliver value to clients.
The company offers excellent career growth opportunities and a supportive work environment.
Cognizant's diverse...
Yes, social media can be used for educational purposes.
Social media provides a platform for sharing educational content and resources.
It allows for collaboration and communication among students and teachers.
Social media can enhance learning through interactive discussions and real-time feedback.
It can also help in reaching a wider audience and promoting educational initiatives.
Examples include educational YouTube chan...
I am a highly motivated and experienced project engineer with a strong background in managing complex engineering projects.
I have a Bachelor's degree in Engineering and have been working as a project engineer for the past 5 years.
I have successfully managed multiple projects from conception to completion, ensuring they are delivered on time and within budget.
I have a proven track record of effectively coordinating with...
The present CEO is John Smith.
John Smith is the current CEO of the company.
He has been in this position since 2015.
Under his leadership, the company has experienced significant growth and expansion.
John Smith has a strong background in engineering and project management.
He is known for his strategic vision and ability to drive innovation.
Polymorphism is the ability of an object to take on many forms. In C++, it is achieved through function overloading and virtual functions.
Polymorphism allows objects of different classes to be treated as objects of a common base class.
Function overloading enables multiple functions with the same name but different parameters.
Virtual functions allow derived classes to override base class functions.
Yes, I know C language. Here's a program to print numbers from 1 to 10 excluding 5.
Use a loop to iterate from 1 to 10
Inside the loop, check if the current number is equal to 5
If it is not equal to 5, print the number
The question was about finding the average of a set of numbers.
I approached the problem by first summing all the numbers in the set.
Then, I divided the sum by the total number of elements in the set to find the average.
I used a loop to iterate through the set and keep track of the sum and count of elements.
Caching is the process of storing frequently used data in a temporary storage to reduce access time. LRU caching removes least recently used data.
Caching improves performance by reducing access time to frequently used data
LRU (Least Recently Used) caching removes the least recently used data to make space for new data
LRU cache can be implemented using a doubly linked list and a hash map
When a cache hit occurs, the acce...
Interview experience
Software Engineer
4
salaries
| ₹13 L/yr - ₹30 L/yr |
Technical Lead
4
salaries
| ₹24.1 L/yr - ₹38 L/yr |
Senior Manager-HR
3
salaries
| ₹28 L/yr - ₹38 L/yr |
Senior Software Engineer
3
salaries
| ₹18 L/yr - ₹22.1 L/yr |
TCS
Accenture
Wipro
Cognizant