Add office photos
Engaged Employer

Josh Software

3.2
based on 101 Reviews
Filter interviews by

Cognizant Interview Questions and Answers

Updated 17 Dec 2024

Q1. What are different software development models?

Ans.

Software development models are frameworks used to structure, plan, and control the process of developing software.

  • Waterfall model

  • Agile model

  • Spiral model

  • Iterative and incremental model

  • V-shaped model

  • Prototype model

Add your answer

Q2. difference between authentication and authorization

Ans.

Authentication verifies the identity of a user, while authorization determines what actions a user is allowed to perform.

  • Authentication confirms the user's identity through credentials like username and password

  • Authorization controls access to resources based on the authenticated user's permissions

  • Example: Logging into a system (authentication) vs. accessing specific files or features within the system (authorization)

Add your answer

Q3. What are async functions?

Ans.

Async functions in JavaScript allow for asynchronous programming using the async/await syntax.

  • Async functions are defined using the 'async' keyword before the function declaration.

  • They allow for the use of the 'await' keyword within the function to pause execution until a promise is settled.

  • Async functions always return a promise.

  • Example: async function fetchData() { await fetch('https://api.example.com/data'); }

Add your answer

Q4. What are node modules>?

Ans.

Node modules are reusable code packages that can be easily imported and used in Node.js applications.

  • Node modules are JavaScript libraries that can be easily installed using npm (Node Package Manager).

  • They help in organizing code, improving code reusability, and managing dependencies.

  • Examples of popular node modules include Express.js for web applications, Lodash for utility functions, and Mongoose for MongoDB interactions.

Add your answer
Discover Cognizant interview dos and don'ts from real experiences

Q5. what is runtime polymorphism

Ans.

Runtime polymorphism is the ability of a function to behave differently based on the object it is called with.

  • Runtime polymorphism is achieved through method overriding in object-oriented programming.

  • It allows a subclass to provide a specific implementation of a method that is already provided by its superclass.

  • The actual method that gets called is determined at runtime based on the type of object.

  • Example: Animal class has a method 'makeSound', Dog and Cat classes override th...read more

Add your answer

Q6. What are promises?

Ans.

Promises are objects representing the eventual completion or failure of an asynchronous operation.

  • Promises are used to handle asynchronous operations in JavaScript.

  • They can be in one of three states: pending, fulfilled, or rejected.

  • Promises can be chained together using .then() to handle success and failure.

  • Example: new Promise((resolve, reject) => { ... }).then(result => { ... }).catch(error => { ... });

Add your answer

Q7. difference between c and cpp

Ans.

C is a procedural programming language while C++ is a multi-paradigm programming language with object-oriented features.

  • C is a procedural programming language, while C++ supports both procedural and object-oriented programming.

  • C does not support classes and objects, while C++ does.

  • C does not have features like inheritance, polymorphism, and encapsulation, which are supported in C++.

  • C++ has additional features like templates, exceptions handling, and namespaces which are not p...read more

Add your answer

Q8. what is polymorphism

Ans.

Polymorphism is the ability of a function or method to behave differently based on the object it is acting upon.

  • Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • It enables a single interface to represent multiple data types.

  • Examples include method overloading and method overriding in object-oriented programming.

Add your answer

Q9. explain merge sort with code

Ans.

Merge sort is a divide and conquer algorithm that recursively splits an array into halves, sorts them, and then merges them back together.

  • Divide the array into two halves

  • Recursively sort each half

  • Merge the sorted halves back together

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Cognizant

based on 6 interviews
2 Interview rounds
Coding Test Round
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

4.1
 • 321 Interview Questions
3.8
 • 76 Interview Questions
4.1
 • 31 Interview Questions
3.6
 • 23 Interview Questions
4.0
 • 12 Interview Questions
3.5
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter