Cognizant
10+ Interview Questions and Answers
Ninja is given an integer ‘N’. One day Ninja decides to do the sum of all digits and replace the ‘N’ with the sum of digits until it becomes less than 10. Ninja wants to find what will be the value...read more
Nth term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -
F(n) = F(n-1) + F(n-2), Where, F(1) = F(2) = 1
Provided N you have to find out the ...read more
Given a string, determine if it is a palindrome, considering only alphanumeric characters.
Palindrome
A palindrome is a word, number, phrase, or other sequences of characters which read the sam...read more
What is Aliasing.
What is oscillator.
Zener diode
Operational amplifier
ASK, PSK, FSK
Convolution theorem
Entropy
Sampling
Cut-off frequency
AM and FM
Repeater
Negative feedback and Positive feedback
In...read more
Ninja is given an integer ‘N’. Ninja wants to find whether the binary representation of integer ‘N’ is palindrome or not.
A palindrome is a sequence of characters that reads the same backward as...read more
Q6. What are the basics concepts of Oops and explain them ?
Object-oriented programming concepts include encapsulation, inheritance, and polymorphism.
Encapsulation: Bundling data and methods together in a class to hide implementation details.
Inheritance: Creating new classes from existing ones, inheriting their properties and behaviors.
Polymorphism: Objects of different classes can be treated as objects of a common superclass.
Example: Encapsulation - A class 'Car' with private variables like 'speed' and public methods like 'accelerate...read more
Q8. What do u know about network security ?
Network security refers to the practice of protecting computer networks from unauthorized access or attacks.
Network security involves implementing various measures to prevent unauthorized access to a network, such as firewalls, intrusion detection systems, and virtual private networks (VPNs).
It also includes ensuring the confidentiality, integrity, and availability of data transmitted over the network.
Examples of network security threats include malware, phishing attacks, and...read more
Q9. What us the meaning of abstract class
An abstract class is a class that cannot be instantiated and is used as a base class for other classes.
An abstract class can have abstract and non-abstract methods.
Abstract methods have no implementation and must be implemented by the derived classes.
An abstract class can have constructors and fields.
An example of an abstract class is the Shape class, where the methods like area() and perimeter() are abstract and must be implemented by the derived classes like Circle and Rect...read more
Q10. What is Paging and Segmentation?
Paging and Segmentation are memory management techniques used by operating systems.
Paging divides memory into fixed-size pages and stores them in physical memory.
Segmentation divides memory into logical segments and stores them in physical memory.
Both techniques allow for efficient use of memory and protection of memory from unauthorized access.
Examples of operating systems that use paging and segmentation include Windows and Linux.
Q11. Explain run time mapping between pages and frames
Run time mapping between pages and frames is the process of mapping virtual memory pages to physical memory frames during program execution.
During program execution, the operating system maps virtual memory pages to physical memory frames to ensure efficient memory management.
This mapping is done dynamically and can change as the program runs.
The mapping is maintained in a page table, which is used by the operating system to translate virtual addresses to physical addresses.
F...read more
Q12. Derivation of Sorting and Searching Complexities
Explanation of how sorting and searching complexities are derived.
Sorting and searching algorithms have different complexities depending on the algorithm used.
Sorting algorithms can be classified as O(n^2) or O(n log n) depending on the algorithm used.
Searching algorithms can be classified as O(n) or O(log n) depending on the algorithm used.
Complexities are derived by analyzing the number of operations required to complete the algorithm.
For example, bubble sort has a complexi...read more
Q13. What is critical section?
Critical section is a part of code that must not be executed by more than one thread at a time.
It is used in multi-threaded programming to avoid race conditions.
It is usually protected by locks or semaphores.
Examples include updating shared variables or accessing shared resources.
It is important for ensuring data consistency and preventing deadlocks.
Q14. Array and linkedlist and arraylist difference
Array, LinkedList, and ArrayList are data structures used to store and manipulate collections of elements.
Arrays are fixed in size and can only store elements of the same data type.
LinkedLists are dynamic in size and can store elements of different data types.
ArrayLists are dynamic in size and can only store elements of the same data type.
Arrays have faster access time for elements, while LinkedLists have faster insertion and deletion time.
ArrayLists are a hybrid of Arrays an...read more
Q15. C/Java/C++ Code for critical section
Code for critical section in C/Java/C++
Use mutex or semaphore to protect critical section
In C/C++, use pthread_mutex_lock() and pthread_mutex_unlock()
In Java, use synchronized keyword
In C++, use std::mutex and std::lock_guard
Ensure only one thread can access critical section at a time
Q16. For loop while loop difference
For loop is used for iterating over a sequence while while loop is used for executing a block of code repeatedly.
For loop is used when the number of iterations is known beforehand
While loop is used when the number of iterations is not known beforehand
For loop is faster than while loop for iterating over a sequence
While loop is useful for creating an infinite loop until a certain condition is met
Q17. new technology that you know anout
One new technology I know about is blockchain, a decentralized and secure way to store and transfer data.
Blockchain is a distributed ledger technology that securely records transactions across multiple computers.
It is most commonly known for being the technology behind cryptocurrencies like Bitcoin.
Blockchain has applications beyond finance, such as supply chain management, voting systems, and healthcare records.
Smart contracts, which are self-executing contracts with the ter...read more
Q18. Port for Windows vm , linux vm
The port numbers for Windows and Linux VMs depend on the specific application or service being used.
Port numbers can vary depending on the specific application or service being used on the VMs.
Common port numbers for Windows VMs include 3389 for Remote Desktop Protocol and 445 for SMB file sharing.
Common port numbers for Linux VMs include 22 for SSH and 80 for HTTP.
It is important to ensure that the necessary ports are open and properly configured for the VMs to function corr...read more
Q19. Storage account types
Storage account types refer to the different types of storage accounts available in cloud computing.
There are four types of storage accounts in Azure: General-purpose v1, General-purpose v2, Blob storage, and Premium Block Blob storage.
General-purpose v1 and v2 accounts are used for storing files, queues, tables, and blobs.
Blob storage accounts are used for storing unstructured data like images, videos, and audio files.
Premium Block Blob storage accounts are used for high-per...read more
More about working at Cognizant
Top HR Questions asked in null
Reviews
Interviews
Salaries
Users/Month