Add office photos
Cognizant logo
Engaged Employer

Cognizant

Verified
3.7
based on 50.3k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Software Engineer
Fresher
Experienced
Clear (2)

20+ Cognizant Software Engineer Interview Questions and Answers for Freshers

Updated 17 Jun 2024

Q1. two puzzles: 1. how can you cut a cake in 8 pieces in minimum number of cuts(answered) ,2.make 4 equilateral triangles using 6 matchsticks(answered)

Ans.

1. Cut cake in 8 pieces in minimum cuts. 2. Make 4 equilateral triangles using 6 matchsticks.

  • 1. Cut cake in half horizontally and vertically. Cut each quarter diagonally.

  • 2. Use 3 matchsticks to form a triangle. Use the other 3 to connect the centers of each triangle.

  • Both puzzles require creative thinking and problem-solving skills.

View 3 more answers
right arrow

Q2. Write a query to find the employee name who earns maximum salary

Ans.

The query finds the employee name who earns the maximum salary.

  • Use the SELECT statement to retrieve the employee name and salary from the database table.

  • Use the ORDER BY clause to sort the results in descending order based on salary.

  • Use the LIMIT clause to limit the result to only one row.

  • Return the employee name from the query result.

View 2 more answers
right arrow

Q3. TC questions: Types of datatypes? Predefined functions? Difference between list and tree? Who is more preferred? Difference between class and object? Difference between inheritance and polymorphism? Aptitude qu...

read more
Ans.

Interview questions for Software Engineer position

  • Datatypes: int, float, string, boolean, etc.

  • Predefined functions: print(), len(), range(), etc.

  • List is linear while tree is hierarchical. Trees are preferred for faster search and insertion.

  • Class is a blueprint while object is an instance of a class.

  • Inheritance is a way to create a new class from an existing class while polymorphism is the ability of an object to take on many forms.

  • Aptitude question on time may involve calcula...read more

Add your answer
right arrow

Q4. what are different phases of waterfall model?

Ans.

Waterfall model has five phases: requirements, design, implementation, testing, and maintenance.

  • Requirements phase: gathering and documenting requirements

  • Design phase: creating a detailed design based on requirements

  • Implementation phase: coding and integrating components

  • Testing phase: verifying that the system meets requirements

  • Maintenance phase: making changes and updates to the system

  • Example: building a website using waterfall model

  • Example: developing a software application...read more

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

Q5. difference between 8085 and 8086 microprocessor

Ans.

8086 is an advanced version of 8085 with more features and capabilities.

  • 8086 has a 16-bit data bus while 8085 has an 8-bit data bus.

  • 8086 has more registers than 8085.

  • 8086 has a higher clock speed than 8085.

  • 8086 supports virtual memory while 8085 does not.

  • 8086 has a more advanced instruction set than 8085.

  • Example: 8086 can perform multiplication and division operations while 8085 cannot.

Add your answer
right arrow

Q6. What is variable, structure some basic code in that

Ans.

A variable is a container that holds a value. A structure is a collection of variables of different data types.

  • Variables are declared with a data type and a name, and can be assigned a value.

  • Structures are declared using the 'struct' keyword and can contain variables of different data types.

  • Example code: int age = 25; struct person { char name[20]; int age; float height; };

  • Variables and structures are fundamental concepts in programming and are used extensively in software de...read more

Add your answer
right arrow
Are these interview questions helpful?

Q7. Sort the array and write a code for searching array element

Ans.

Sort and search an array in software engineering interview

  • Use built-in sorting functions or implement your own sorting algorithm

  • For searching, use linear search or binary search depending on the size of the array

  • Consider the time complexity of the sorting and searching algorithms

  • Ensure the code is efficient and handles edge cases properly

Add your answer
right arrow

Q8. what is the difference between java 7 and java 8

Ans.

Java 8 introduced new features like lambda expressions, streams, and default methods compared to Java 7.

  • Java 8 introduced lambda expressions for functional programming.

  • Java 8 added streams API for processing collections in a functional style.

  • Java 8 introduced default methods in interfaces to allow adding new methods to interfaces without breaking existing implementations.

  • Java 8 included the new Date and Time API (java.time) to address the shortcomings of the old java.util.Dat...read more

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. skeleton of html , what is variables?

Ans.

Variables in HTML are used to store and manipulate data within a web page.

  • Variables in HTML are typically used in conjunction with JavaScript to store and manipulate data.

  • They are declared using the 'var' keyword.

  • Variables can store various types of data such as strings, numbers, and booleans.

  • Example: var name = 'John';

Add your answer
right arrow

Q10. What is design patterns in java

Ans.

Design patterns are reusable solutions to common software problems in Java.

  • Design patterns provide a standard way to solve common problems in software development.

  • They help in creating flexible, reusable, and maintainable code.

  • Examples of design patterns include Singleton, Factory, Observer, and Decorator.

  • Design patterns can be categorized into three types: creational, structural, and behavioral.

Add your answer
right arrow

Q11. draw pin diagram of 8085 microprocessor

Ans.

Pin diagram of 8085 microprocessor

  • 8085 has 40 pins in total

  • Pins are grouped into 5 categories: power supply, address bus, data bus, control and status signals

  • Pin 1 is the reset pin, Pin 40 is the Vcc pin

  • Examples of control signals: RD, WR, ALE, INT, HOLD

  • Examples of status signals: S0, S1, IO/M, HLDA

Add your answer
right arrow

Q12. what is opamp?

Ans.

Opamp stands for operational amplifier. It is an electronic device used to amplify and process signals.

  • Opamps have high gain and can amplify signals to a very high degree.

  • They are commonly used in audio amplifiers, filters, and signal processing circuits.

  • Opamps have two input terminals and one output terminal.

  • They can be configured in different ways to perform various functions such as amplification, filtering, and oscillation.

  • Examples of opamps include LM741, LM358, and TL08...read more

Add your answer
right arrow

Q13. What is stack?

Ans.

A stack is a data structure that follows the Last In First Out (LIFO) principle.

  • Elements are added to the top of the stack and removed from the top.

  • Common operations include push (add element) and pop (remove element).

  • Stacks are used in programming for function calls, expression evaluation, and memory management.

View 1 answer
right arrow

Q14. Explain the term inheritance?

Ans.

Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.

  • Inheritance allows code reusability and saves time and effort in writing new code.

  • The existing class is called the parent or base class, and the new class is called the child or derived class.

  • The child class inherits all the properties and methods of the parent class and can also add its own unique properties and methods.

  • For example, a class 'An...read more

View 1 answer
right arrow

Q15. What is an array?

Ans.

An array is a collection of elements of the same data type, stored in contiguous memory locations.

  • Arrays can be one-dimensional or multi-dimensional

  • Elements in an array can be accessed using their index

  • Arrays can be initialized with values at declaration

  • Examples: int[] numbers = {1, 2, 3}; char[] letters = {'a', 'b', 'c'};

  • Arrays have a fixed size once declared

View 1 answer
right arrow

Q16. Explain data type in c?

Ans.

Data type in C refers to the type of data that a variable can hold.

  • C has basic data types like int, float, char, double, etc.

  • Derived data types like arrays, pointers, structures, and unions can also be created.

  • Each data type has a specific range of values that it can hold.

  • Data types can be modified using type qualifiers like const, volatile, etc.

View 1 answer
right arrow

Q17. code to remove duplicate entries in a string

Ans.

Code to remove duplicate entries in a string

  • Create an empty array to store unique strings

  • Iterate through each string in the input array

  • Check if the string is already in the unique array, if not add it

Add your answer
right arrow

Q18. What is synchronisation in java.

Ans.

Synchronization in Java is the process of controlling access to shared resources by multiple threads.

  • Synchronization is achieved using the synchronized keyword in Java.

  • It ensures that only one thread can access the shared resource at a time.

  • Synchronization can be applied to methods or blocks of code.

  • It is used to prevent race conditions and ensure thread safety.

  • Example: synchronized void myMethod() { //code }

  • Example: synchronized(this) { //code }

Add your answer
right arrow

Q19. types of testing

Ans.

Types of testing include unit, integration, system, acceptance, regression, performance, and security testing.

  • Unit testing: testing individual units or components of the software

  • Integration testing: testing how different units or components work together

  • System testing: testing the entire system as a whole

  • Acceptance testing: testing to ensure the software meets the requirements and is ready for release

  • Regression testing: testing to ensure changes or updates to the software do ...read more

Add your answer
right arrow

Q20. Write string reverse program

Ans.

Program to reverse a given string.

  • Iterate through the string from end to start and append each character to a new string.

  • Use built-in functions like reverse() or slice() in some programming languages.

  • Convert the string to an array, reverse the array, and then join the array back into a string.

View 2 more answers
right arrow

Q21. What is gibs free energy?

Ans.

Gibbs free energy is a thermodynamic potential that measures the maximum amount of work that can be obtained from a system.

  • It is denoted by the symbol G.

  • It takes into account both the enthalpy and entropy of a system.

  • A negative value of G indicates that a reaction is spontaneous.

  • It is used to predict the feasibility of a chemical reaction.

  • It is also used in the study of phase transitions and the stability of materials.

Add your answer
right arrow

Q22. Write a program using recursion

Ans.

A program using recursion

  • Recursion is a technique where a function calls itself to solve a problem

  • It involves a base case and a recursive case

  • Examples include factorial, Fibonacci sequence, and binary search

Add your answer
right arrow

Q23. What is the class?

Ans.

A class is a blueprint for creating objects that have similar attributes and methods.

  • A class is a user-defined data type that encapsulates data and functions.

  • It is a template for creating objects.

  • It provides a way to organize and structure code.

  • Objects are instances of a class.

  • Classes can inherit properties and methods from other classes.

  • Examples include String, Integer, and List in Java.

Add your answer
right arrow

Q24. 2. Explain the OOPs concepts

Ans.

OOPs concepts are the fundamental principles of Object-Oriented Programming.

  • Abstraction: Hiding implementation details and showing only necessary information.

  • Encapsulation: Binding data and functions together to protect data from outside interference.

  • Inheritance: Acquiring properties and behavior of a parent class by a child class.

  • Polymorphism: Ability of an object to take many forms or have multiple behaviors.

Add your answer
right arrow

More about working at Cognizant

Back
Awards Leaf
AmbitionBox Logo
Top Rated Mega Company - 2024
Awards Leaf
Awards Leaf
AmbitionBox Logo
Top Rated IT/ITES Company - 2024
Awards Leaf
HQ - Teaneck. New Jersey., United States (USA)
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Cognizant Software Engineer for Freshers

based on 14 interviews
4 Interview rounds
Resume Shortlist Round
HR Round
Aptitude Test Round - 1
Aptitude Test Round - 2
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

PayPal Logo
3.9
 • 41 Interview Questions
Tekion Logo
3.1
 • 15 Interview Questions
Jio Logo
3.9
 • 10 Interview Questions
View all
Recently Viewed
INTERVIEWS
Tech Mahindra
Fresher
5.6k top interview questions
INTERVIEWS
Teleperformance
20 top interview questions
INTERVIEWS
Teleperformance
40 top interview questions
INTERVIEWS
Lemongrass Consulting
20 top interview questions
INTERVIEWS
Tech Mahindra
10 top interview questions
INTERVIEWS
Tech Mahindra
30 top interview questions
INTERVIEWS
iEnergizer
10 top interview questions
INTERVIEWS
Tech Mahindra
30 top interview questions
INTERVIEWS
Mystifly Consulting
40 top interview questions
CAMPUS PLACEMENT
SRM university (SRMU)
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
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