i
Cognizant
Filter interviews by
Generics in C++ allow for writing generic algorithms and data structures that work with any data type.
Generics in C++ are implemented using templates, which allow for writing code that can work with any data type.
Templates are a way to create generic functions or classes without specifying the data type.
For example, a generic function to find the maximum of two values can be written using templates.
Another example...
Object-oriented programming concepts that focus on objects and classes for code organization and reusability.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
Inheritance: Ability of a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation detai...
A program to check if a given string is a palindrome or not.
Create a function that takes a string as input.
Reverse the string and compare it with the original string.
If they are the same, then the string is a palindrome.
Examples: 'madam' is a palindrome, 'hello' is not a palindrome.
A package is a way to organize related classes and interfaces in Java.
Packages help in organizing code and avoiding naming conflicts
Packages can be nested within each other
Packages are declared using the 'package' keyword at the beginning of a Java file
What people are saying about Cognizant
A program to find the addition of two numbers
Declare two variables to store the numbers
Take input from user or use predefined values
Add the two numbers together
Print the result
Main concepts in Java include object-oriented programming, inheritance, polymorphism, encapsulation, and abstraction.
Object-oriented programming: Java is an object-oriented language where everything is treated as an object.
Inheritance: Allows a class to inherit properties and behavior from another class.
Polymorphism: Ability of an object to take on many forms.
Encapsulation: Bundling of data and methods that operat...
Sort array of strings using Java Stream API
Use Arrays.stream() to convert array to stream
Use sorted() method to sort the stream
Use collect() method to convert the sorted stream back to array
Reverse a given string
Use a loop to iterate through the characters of the string
Swap the characters from start to end of the string
Repeat until the entire string is reversed
To reverse an array of numbers, iterate through the array and swap elements from start to end.
Iterate through the array using two pointers, one starting from the beginning and the other from the end.
Swap elements at the two pointers and move the pointers towards the center until they meet.
Example: Input array [1, 2, 3, 4, 5], after reversing becomes [5, 4, 3, 2, 1].
Data types are classifications of data items that determine the possible values and operations that can be performed on them.
Data types define the type of data that a variable can hold, such as integers, strings, or booleans.
Examples of data types include int (integer), float (floating point number), char (character), and bool (boolean).
Data types also determine the size of the variable in memory and the range of ...
I applied via Campus Placement and was interviewed in Nov 2024. There were 2 interview rounds.
Aptitude test includes number series, profit and loss, percentage, train problems
The aptitude test was quite easy.
Questions are moderated.
I am a recent graduate with a degree in Computer Science and a passion for coding. I have experience with Java, Python, and web development.
Recent graduate with a degree in Computer Science
Passionate about coding and software development
Proficient in Java, Python, and web development
Experience with projects such as building a web application using Django
I applied via Naukri.com and was interviewed in Oct 2024. There was 1 interview round.
Yes, Java is platform independent due to its ability to compile code into bytecode that can run on any platform with a Java Virtual Machine (JVM).
Java code is compiled into bytecode, which can run on any platform with a JVM.
The JVM acts as an intermediary between the Java code and the underlying platform.
This allows Java programs to be written once and run on any platform without modification.
OOPS stands for Object-Oriented Programming System. It is a programming paradigm based on the concept of objects.
OOPS focuses on creating objects that contain both data and methods to manipulate that data.
Encapsulation, inheritance, and polymorphism are key principles of OOPS.
Examples of OOPS languages include Java, C++, and Python.
Easy question contains coding aptitude and java basic question
Reverse a string using different approaches
Use built-in functions like reverse() or StringBuilder.reverse()
Iterate through the string and build a new string in reverse order
Use recursion to reverse the string
In C++, 'oops' typically refers to Object-Oriented Programming concepts and principles.
Oops in C++ refers to Object-Oriented Programming concepts like classes, objects, inheritance, polymorphism, and encapsulation.
Common mistakes in C++ programming include memory leaks, null pointer dereferencing, and improper use of pointers.
Example: Forgetting to delete dynamically allocated memory can lead to memory leaks in C++ pro...
Generics in C++ allow for writing generic algorithms and data structures that work with any data type.
Generics in C++ are implemented using templates, which allow for writing code that can work with any data type.
Templates are a way to create generic functions or classes without specifying the data type.
For example, a generic function to find the maximum of two values can be written using templates.
Another example is a...
Object-oriented programming concepts that focus on objects and classes for code organization and reusability.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
Inheritance: Ability of a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details an...
A program to check if a given string is a palindrome or not.
Create a function that takes a string as input.
Reverse the string and compare it with the original string.
If they are the same, then the string is a palindrome.
Examples: 'madam' is a palindrome, 'hello' is not a palindrome.
I applied via AmbitionBox and was interviewed in Apr 2024. There was 1 interview round.
Oops pillars are the four main principles of object-oriented programming: Inheritance, Encapsulation, Abstraction, and Polymorphism.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Abstraction: Hiding the complex implementation details and showing only the necessary features of an object.
Polymorphism: A...
Hashmap is a data structure that stores key-value pairs and uses hashing to quickly retrieve values based on keys.
Hashmap uses an array to store key-value pairs.
Keys are hashed to determine the index where the value will be stored.
Collision handling techniques like chaining or open addressing are used to deal with multiple keys hashing to the same index.
Retrieving a value involves hashing the key to find the index and ...
Multithreading is the ability of a CPU to execute multiple threads concurrently, while synchronization is the coordination of multiple threads to ensure data consistency.
Multithreading allows multiple threads to run concurrently on a single CPU core.
Synchronization is used to coordinate access to shared resources among multiple threads.
Examples of synchronization mechanisms include locks, semaphores, and monitors.
Multi...
Abstract class can have both abstract and non-abstract methods, while functional interface can have only one abstract method.
Abstract class can have constructors, fields, and methods, while functional interface can only have one abstract method.
Abstract class can have abstract and non-abstract methods, while functional interface can only have one abstract method.
Abstract class can provide default implementations for me...
I applied via Campus Placement
It was a decent aptitude test if you practice well you can clear it.
In coding test they asked about oops concepts and said to code.And all the basic programming questions.
Second largest number in array
Sort array of strings using Java Stream API
Use Arrays.stream() to convert array to stream
Use sorted() method to sort the stream
Use collect() method to convert the sorted stream back to array
Reverse a given string
Use a loop to iterate through the characters of the string
Swap the characters from start to end of the string
Repeat until the entire string is reversed
Normal aptitude questions were asked
Ques from java, sql were asked
Some of the top questions asked at the Cognizant Junior Software Engineer interview -
The duration of Cognizant Junior Software Engineer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 47 interview experiences
Difficulty level
Duration
based on 462 reviews
Rating in categories
Associate
73k
salaries
| ₹5.3 L/yr - ₹12.5 L/yr |
Programmer Analyst
56.2k
salaries
| ₹3.5 L/yr - ₹7.3 L/yr |
Senior Associate
55.1k
salaries
| ₹9.7 L/yr - ₹23.4 L/yr |
Senior Processing Executive
29.8k
salaries
| ₹2.3 L/yr - ₹6.5 L/yr |
Technical Lead
19k
salaries
| ₹6 L/yr - ₹21 L/yr |
TCS
Infosys
Wipro
Accenture