Cognizant is a multinational technology company that specialises in providing IT services and consulting solutions. Founded in 1994, Cognizant has grown to be one of the largest IT services companies in the world.
Cognizant offers a wide range of services including IT consulting, application development, system integration, infrastructure services, business process outsourcing (BPO), digital solutions, security, sustainability services, and more.
Cognizant has been actively involved in helping organizations navigate digital transformation by leveraging emerging technologies such as Artificial Intelligence (AI), machine learning, Intelligent process automation, cloud computing, Internet of Things (IoT), and analytics.
Cognizant is at the forefront of technological advancement and offers a great learning opportunity and career path for aspiring candidates.
The Cognizant recruitment process typically follows three stages. They are Aptitude test, Technical interview and HR interview.
Aptitude Test: This is an MCQ-based test and is divided into three sections namely Quantitative Ability, Logical Reasoning, and English Comprehension.
Technical Interview: This round focuses on the job profile and evaluates the programming skills of the candidate. Having proficiency in one of the coding languages like C, C++, Java or Python, etc, is a must. Candidates should also have basic awareness on contemporary trends like AI, Big data among others.
HR Round: This is the final stage of the interview process. The purpose of this interview is to assess your personality, background, fit with the company culture, salary expectations, etc.
Some of the common HR interview questions you can expect at Cognizant are -
A pointer is a variable that stores the address of another variable. It is used to point to the variables indirectly. It makes it possible to manipulate the values.
A memory leak occurs when objects available in a heap are not utilised. The garbage collector fails to remove it from memory. Hence these objects are kept in the memory unnecessarily. Memory leaks can lead to performance issues and are bad for the application's health.
Garbage collection is a memory management mechanism. An algorithm automatically detects the unused objects in the memory and deletes them.
The most commonly used garbage collection algorithm is Mark and Sweep algorithm.
Objects that are dynamically created are stored in the heap memory. If objects are created without management, the memory will exhaust, crashing the system.
Mark and Sweep algorithm is a garbage collection algorithm. It works in two phases.
In the first phase, the algorithm detects the unused objects in the memory, while in the second phase, these objects are removed from the memory to reclaim the wasted space.
Pointers that are not initialised with a valid address are called dangling pointers. It occurs during the object destruction phase. The object is destroyed from memory, but the pointer's address is not changed.
The process when a function calls itself directly or indirectly is called Recursion and the corresponding function is called a Recursive function.
A data type is characteristic of the data. It helps the compiler understand how the programmer intends to use the data.
The malloc() function stands for memory allocation. It is a function that is used to allocate a block of memory dynamically.
Example:
ptr = (cast-type*) malloc(bite-size);
The string is a data type. It is used to represent a sequence of characters.
Language | Keyword | Example |
---|---|---|
C | char | 'A' |
C++ | string | "Hello World" |
Java | string | "Hello World" |
Python | str() | "Hello world" |
An integer is a data type. It is used to represent numbers.
Language | Keyword |
---|---|
C | int |
C++ | int |
Java | int |
Python | int |
The array is a collection of similar elements stored in the contiguous memory block. The data stored in the memory can be accessed by index. Arrays are used to store large amounts of data in the memory.
There are eight primitive data types in Java. These data types have no additional methods. It only mentions the size and type of the variable value.
int | Integer |
---|---|
It is a primitive data type. | It is a wrapper class |
It has no additional methods | It has additional methods and flexibility for storing and manipulating the data. |
int is not a class. | An integer is a class |
The bootloader, also known as the boot manager, is a program essential for booting a computer. It places the computer Operating System into the memory.
Interpreter | Compiler |
---|---|
Translates one line of code at a time. | It scans the entire piece of code and converts it into machine code. |
It is faster than a compiler in analysing the program. | Although it is slower to analyse the program. But the overall execution time of the compiler is faster than the interpreter. |
hey are memory efficient. | As the compiler generates object code, it is less memory efficient than the interpreter. |
Examples: Python, Ruby | Examples: C, C++, Java |
OOP stands for Object-Oriented Programming. It is about writing code in functions and procedures. The idea is about writing code in a minimalistic way that reuses code. The OOP follows -
Abstraction is the concept of object-oriented programming that shows only essential attributes while hiding the unnecessary data and implementation from the end-user.
Inheritance is a mechanism that allows one object to acquire all the characteristics and properties of another object. A class used for inheritance is called the base class or superclass, while the class that inherits is called a derived class or subclass.
It can be understood from a simple natural example - The son inherits all the properties and characteristics of his parents. You can create multiple objects using the template of parent objects.
Encapsulation is a way of protecting the data from outside access. It is done by wrapping it under a single program or function.
The data in an encapsulated class is hidden from other classes by declaring the variables of a class as private.
Polymorphism means taking multiple forms. The object in the program can act in different ways depending on the message or the event occurring.
A very good example of polymorphism is that a man can have different roles like father, son, or uncle yet he is the same person.
A constructor is used to initialise the state of an object. It is similar to the method. Every time a class is instantiated, a constructor is used for it. During the instantiation, the memory required for the object is allocated.
There are 2 types of constructors in Java
Destructor is used to destroy the objects that are created while the class was instantiated. It is a special method that gets called when the object lifecycle comes to an end. It can remove the object from the memory and reclaim the space.
The destructor also releases any locks held by the object and closes the database connections.
No, you cannot override a constructor in Java. The constructor is similar to a method because it does not work like the Java method. If you try to call a super class’s constructor in a subclass, the compiler treats it as a method and will throw a compilation error.
Constructor overloading can be defined as the concept of having multiple constructors with different parameters so that every constructor can perform a different task.
In Java, these constructors must have unique signatures and for error-free compilation different set of arguments must be passed to the constructor
Example:
Input:
public class Employee {
int uid;
String name;
// Default constructor
Employee() {
System.out.println("This is a default constructor");
}
// Parameterized constructor
Employee(int i, String n) {
uid = i;
name = n;
}
public static void main(String[] args) {
// Object creation using the default constructor
Employee s = new Employee();
System.out.println("\nDefault Constructor values: \n");
System.out.println("Employee uid: " + s.uid + "\nEmployee Name: " + s.name);
System.out.println("\nParameterized Constructor values: \n");
// Object creation using the parameterized constructor
Employee employee = new Employee(10, "John");
System.out.println("Employee uid: " + employee.uid + "\nEmployee Name: " + employee.name);
}
}
Output:
This is a default constructor
Default Constructor values:
Employee uid: 0
Employee Name: null
Parameterized Constructor values:
Employee uid: 10
Employee Name: John
A virtual function is a member function that is declared in the base class and it is overridden by the derived class. The virtual function helps in achieving runtime polymorphism. Rules to keep in mind for virtual functions:
DML is also known as Data Manipulation Language. These statements are used to manipulate the database objects inside the database.
Following are commands in DML
DDL is also known as Data Definition Language. These statements are used to define or modify objects in the database.
Following are commands in DDL
In conclusion, preparing for a Cognizant interview requires a combination of technical knowledge, problem-solving abilities, and a strong understanding of Cognizant's values and work environment. It's important to research the company, its services, and recent initiatives to demonstrate your interest and alignment with their goals.
To succeed in the interview, be sure to highlight your relevant experience, technical proficiency, and problem-solving skills. Prepare specific examples from your past projects or work experiences that demonstrate your abilities and achievements. Additionally, emphasize your ability to work in teams, adapt to a dynamic environment, handle challenges, and communicate effectively.
Lastly, approach the interview with confidence, be yourself, and demonstrate enthusiasm for the role and the opportunity to work at Cognizant.
To prepare for a technical interview, review the job requirements, refresh your knowledge in relevant programming languages and technologies, practice problem-solving and coding exercises, and be ready to discuss your past technical experiences.
Yes, Cognizant often includes technical assessments as part of their interview process. These assessments can range from coding tests to technical problem-solving exercises or case studies, depending on the role you are applying for.
Yes, researching Cognizant is crucial before the interview. Understanding the company's background, services, culture, and recent initiatives will help you tailor your answers and demonstrate your interest and knowledge during the interview.