Quest Global
Cogent Innovations Interview Questions and Answers
Q1. What is mutex and who it overcome with it..?
A mutex is a synchronization primitive used to control access to shared resources in a multi-threaded environment.
Mutex stands for mutual exclusion
It is used to prevent multiple threads from accessing shared resources simultaneously
Mutexes are typically used to protect critical sections of code
Example: In a multi-threaded program, a mutex can be used to ensure that only one thread can access a shared variable at a time
Q2. What are value and reference types
Value types store the actual value, while reference types store a reference to the value.
Value types include primitive types like int, float, bool, etc.
Value types are stored on the stack and have a fixed size.
Reference types include objects, arrays, and strings.
Reference types are stored on the heap and have a variable size.
Assigning a value type to another variable creates a copy of the value.
Assigning a reference type to another variable creates a new reference to the same...read more
Q3. What is programming language used for?
Programming languages are used to write instructions for computers to execute tasks and solve problems.
Programming languages are used to create software applications, websites, and games.
They are used to automate tasks and processes, such as data analysis and machine learning.
Programming languages are also used in scientific research, financial analysis, and engineering.
Examples of programming languages include Java, Python, C++, and JavaScript.
Q4. Wap to toggle the fourth bit of given number..?
Toggle the fourth bit of a given number.
Extract the fourth bit using bitwise AND operation with 8 (1000 in binary)
Toggle the fourth bit using bitwise XOR operation with 8 (1000 in binary)
Q5. What is DSA used for?
DSA is used for efficient data organization and manipulation in computer algorithms.
DSA stands for Data Structures and Algorithms
It is used to optimize the performance of computer algorithms
DSA helps in efficient data organization and manipulation
Examples of DSA include arrays, linked lists, trees, graphs, and sorting algorithms
Q6. What is Mutithreading
Multithreading is the ability of a CPU to execute multiple threads concurrently.
Multithreading allows for better utilization of CPU resources.
It can improve application performance by allowing multiple tasks to run simultaneously.
Multithreading can be implemented in various programming languages such as Java, C++, and Python.
Examples of multithreaded applications include web servers, video games, and media players.
Q7. What is polymorphism
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they were objects of the same class.
It is achieved through method overriding and method overloading.
Example: A parent class Animal has a method called makeSound(). The child classes Dog, Cat, and Cow can override this method to make their own unique sounds.
Another example is method overloading where a class can have multiple methods with the same...read more
Interview Process at Cogent Innovations
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month