Cognizant
2500+ Interview Questions and Answers
Q1. 1 Tell me about your self 2 What is c# 3 What is oops concept 4 What is Delegate 5 Difference between polymorphism and what are its type 6 What is out and ref keyword 7 What is call by ref and call by value 8 W...
read moreInterview questions for Programmer Analyst position
C# is a programming language used for developing Windows applications
OOPS concepts include inheritance, encapsulation, abstraction, and polymorphism
Delegate is a type that represents references to methods with a specific parameter list and return type
Polymorphism is the ability of an object to take on many forms. Types include compile-time and runtime polymorphism
Out and ref keywords are used for passing arguments by referenc...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
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.
Note:
Each pair shou...read more
Q4. Check for syntax error/logical error and correct the error to get the desired output. void maxReplace(int size,int *inputList) { int i,sum=0; for(i=0;i
Fix syntax and logical errors in maxReplace function
Change 'o' to '0' in second for loop
Replace sum with inputList[i] in second for loop
Add a condition to check if inputList[i] is greater than sum in second for loop
Print sum instead of inputList[i] in third for loop
Q5. What is meant by quality and brief explanation of it with an example?
Quality refers to the degree of excellence or superiority of a product or service.
Quality is subjective and can vary depending on the customer's expectations.
It can be measured through various metrics such as defect rate, customer satisfaction, and reliability.
For example, a high-quality car would have a low defect rate, high customer satisfaction, and be reliable.
Quality is important for customer loyalty and brand reputation.
Continuous improvement is necessary to maintain an...read more
Q6. A train travelling at a speed of 75 mph enters a tunnel 31/2 miles long. The train is 1/4 mile long. How long does it take for the train to pass through the tunnel from the moment the front enters to the moment...
read moreCalculate the time taken by a train to pass through a tunnel given its speed, length, and the tunnel's length.
Convert the speed of the train from mph to miles per minute.
Calculate the time taken by the front of the train to enter the tunnel.
Calculate the time taken by the rear of the train to exit the tunnel.
Subtract the time taken by the front from the time taken by the rear to get the total time taken.
Add the units to the final answer.
You have been given a sorted (lexical order) dictionary of an alien language. Write a function that finds the order of characters in the alien language. This dictionary will be given to you in t...read more
Given an array "prices". In "prices" the ith element is the price of the stock on the ith day. Your task is to find maximum profit at the end of the ith day. You may complete at max 2 tr...read more
Q9. What is stack? How do you convert a queue to stack?
Stack is a data structure that follows LIFO (Last In First Out) principle. Converting a queue to stack requires dequeuing and pushing elements.
Stack is a collection of elements with two main operations: push and pop.
Push adds an element to the top of the stack, while pop removes the top element.
Converting a queue to stack requires dequeuing all elements and pushing them onto a stack.
Example: Queue: 1-2-3-4-5, Stack: 5-4-3-2-1
Q10. if you promised a customer for the product on a specific day and your company will not be able to give that product on time then how will you convince that customer ?
I would apologize for the delay and offer a solution or compensation.
Acknowledge the inconvenience caused to the customer
Explain the reason for the delay and assure them that steps are being taken to resolve it
Offer a solution or compensation to make up for the delay
Maintain open communication with the customer throughout the process
Q11. What array list and linkedlist difference,how hashmap internally working,what is synchronised and it's type,what is difference between abstract and interface,class loading mechanism in Java, you hat is single t...
read moreJava Developer interview questions covering array list, linkedlist, hashmap, synchronization, abstract vs interface, singleton class, Spring framework, database configuration, and Java 8 features.
ArrayList and LinkedList differ in terms of implementation, performance, and usage
HashMap uses hashing to store and retrieve key-value pairs
Synchronized is used to ensure thread safety and prevent race conditions
Abstract classes cannot be instantiated and can have both abstract and n...read more
You have been given a square chessboard of size ‘N x N’. The position coordinates of the Knight and the position coordinates of the target are also given.
Your task is t...read more
Q13. Tell me the logic of program to reverse a given string word by word without using any built in function.
The logic of the program is to reverse a given string word by word without using any built-in function.
Split the string into an array of words using whitespace as the delimiter.
Iterate through the array of words in reverse order.
Append each word to a new string, separated by a space.
Q14. What do you mean by BPO and what do you understand by the term of insurance
BPO stands for Business Process Outsourcing. Insurance refers to a contract between an individual and an insurance company.
BPO involves outsourcing non-core business functions to a third-party provider
Insurance is a means of protection against financial loss
Types of insurance include life, health, auto, and property insurance
Insurance companies collect premiums from policyholders and use the funds to pay out claims
BPO services can be used in the insurance industry for tasks s...read more
Ninja has built his team of ninjas to fight with the enemies in his city. Ninja made a plan of attacking all his enemies. In his team, every ninja has his own range of hitting and they had secretly ...read more
Q16. What’s breach? What happens if either party breaches a contract?
Breach is a violation of a contract. It can result in legal action and damages.
Breach occurs when one party fails to fulfill their obligations under a contract.
It can be a material breach, which is a serious violation, or a minor breach.
If a breach occurs, the non-breaching party can seek legal action and damages.
For example, if a contractor fails to complete a project on time, the client may sue for damages.
If an employee breaches a non-compete agreement, the employer may se...read more
Q17. 2.What programming language are you proficient with..?
I am proficient in multiple programming languages including Java, Python, and C++.
Proficient in Java, Python, and C++
Experience with web development languages such as HTML, CSS, and JavaScript
Familiarity with scripting languages like Bash and PowerShell
Knowledge of database languages like SQL and NoSQL
Comfortable with object-oriented programming and design patterns
You are given an array 'ARR' of the 'N' element. Your task is to find the maximum difference between any of the two elements from 'ARR'.
If the maximum difference is even print “EVEN” without ...read more
Q19. What is the function of spark plug in diesel engine?
Spark plug ignites the fuel-air mixture in diesel engine to start combustion process.
Spark plug creates a spark to ignite the fuel-air mixture in the combustion chamber
This starts the combustion process which powers the engine
Diesel engines usually have glow plugs to preheat the combustion chamber for easier ignition
Ninja wants to travel from his house to a given destination, which is ‘X’ miles from his house. Along the way, he needs to fill gas in his vehicle. He knows there are ‘Y’ stations in his way. He ...read more
You are given N number of intervals, where each interval contains two integers denoting the start time and the end time for the interval.
The task is to merge all the overlapping intervals and re...read more
You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more
Q23. How to decide whether to use "call" or "apply" in javascript?
The choice between 'call' and 'apply' in JavaScript depends on whether you have the arguments as an array or as individual parameters.
Use 'call' when you have the arguments as individual parameters.
Use 'apply' when you have the arguments as an array.
Both 'call' and 'apply' allow you to invoke a function with a specific 'this' value.
Q24. Application of Row_Number, Rank, and Dense Rank? Different stages of defects/Bugs? What are Schema objects? Different types of loads in ETL Testing? What is Junk Dimension? SQL to remove duplicates from a table...
read moreInterview questions on SQL and ETL testing
Row_Number, Rank, and Dense Rank are used for ranking and ordering data in SQL
Defects/Bugs can be classified into different stages such as Open, In Progress, Resolved, Closed, etc.
Schema objects are database objects such as tables, views, indexes, etc.
Different types of loads in ETL Testing include Full Load, Incremental Load, and Delta Load
Junk Dimension is a dimension table that contains low cardinality columns
SQL to remove duplicat...read more
For a given array/list of integers of size N, print the Next Greater Element(NGE) for every element. The Next Greater Element for an element X is the first element on the right side of X in ...read more
Q26. What is an API? Why APIs are so popular these days? What is API Management? Why we need an API Management tool such as Apigee Edge? What is REST? What is the difference between SOAP & REST API ? What is API Pro...
read moreAnswers to common questions related to APIs, API management, and Apigee Edge
API stands for Application Programming Interface and is a set of protocols and tools for building software applications
APIs are popular because they allow different software systems to communicate and share data with each other
API management involves the process of creating, publishing, documenting, and analyzing APIs
Apigee Edge is an API management tool that provides features such as security, analyt...read more
You are given an array ARR having N integers. Your task is to find the sum of Hamming Distance for each pair of the array elements.
Hamming Distance for two given integers 'A' an...read more
Q28. If we have 200 staging tables, 40 dimensions tables and 20 facts table, How will you compare it with target systems
The number of staging, dimension and fact tables in source and target systems need to be compared.
Compare the number of staging, dimension and fact tables in source and target systems.
Check if the table names and column names are consistent in both systems.
Verify if the data types and data values are matching in both systems.
Ensure that the ETL process is properly mapping the data from source to target systems.
Perform data profiling to identify any discrepancies between the s...read more
Given an undirected and disconnected graph G(V, E), containing 'V' vertices and 'E' edges, the information about edges is given using 'GRAPH' matrix, where i-th edge is between GRAPH[i][0] and GRAP...read more
Q30. 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)
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.
Q31. What are OOP characteristics? Difference between abstraction and encapsulation? What are types of polymorphism ?4 to 5 Question on projects which I have mentioned in cv. Write a program to find the prime factor...
read moreAnswering questions related to OOP characteristics, polymorphism, and programming projects.
OOP characteristics include inheritance, encapsulation, abstraction, and polymorphism.
Abstraction is the process of hiding implementation details while encapsulation is the process of hiding data.
Types of polymorphism include compile-time and runtime polymorphism.
Projects mentioned in CV were discussed and explained.
A program to find prime factors of a number can be written using a loop...read more
Q32. Why is java platform independent?
Java is platform independent due to its bytecode and JVM.
Java code is compiled into bytecode which is platform-independent.
JVM (Java Virtual Machine) interprets the bytecode and executes it on any platform.
This eliminates the need for recompilation of code for different platforms.
For example, a Java program compiled on Windows can run on Linux or Mac without any changes.
This makes Java highly portable and flexible.
Print the following pattern
Pattern for N = 4
The dots represent spaces.
Input Format :
N (Total no. of rows)
Output Format :
Pattern in N lines
Constraints :
0 <= N <= 50
Q34. WHAT YOU KNOW HEALTH CARE DOMAIN IN THE US SYSTEM?
I have knowledge of the US healthcare system and its regulations.
I am aware of the Affordable Care Act (ACA) and its impact on the healthcare industry.
I understand the role of insurance companies and government programs like Medicare and Medicaid.
I know about the various healthcare providers such as hospitals, clinics, and private practices.
I am familiar with the electronic health record (EHR) system and its importance in healthcare.
I have knowledge of healthcare data managem...read more
Q35. What is the difference between structure and class?
Structures are value types while classes are reference types.
Structures are allocated on stack while classes are allocated on heap.
Structures do not support inheritance while classes do.
Structures cannot have explicit parameterless constructors while classes can.
Structures are used for small data structures while classes are used for larger, more complex objects.
Example of structure: struct Point { int x, y; }
Example of class: class Person { string name; int age; }
Q36. Which programming language are you familiar with? what are the datasets in python what is the difference between list and tuple in python? write a program to find number of white spaces in a given string? what ...
read moreAnswering questions related to programming language Python.
I am familiar with Python programming language.
Datasets in Python include NumPy, Pandas, and SciPy.
List is mutable while Tuple is immutable in Python.
Program to find number of white spaces in a given string: def count_spaces(string): return string.count(' ')
While loop executes a block of code as long as the condition is true, for loop executes a block of code for a specific number of times.
Q37. A frog is stuck in a 100m deep well. the jump takes it 2 m high but he falls down 1m as well. It continues doing until it reaches the top of well. so how many jumps will be required by frog to get out of the we...
read moreThe frog will require 98 jumps to get out of the well.
The frog jumps 2m high but falls down 1m, so it covers a net distance of 1m with each jump.
To calculate the number of jumps, we need to subtract the initial jump of 2m from the total depth of the well (100m).
The remaining distance to cover is 100m - 2m = 98m.
Since the frog covers 1m with each jump, it will require 98 jumps to cover the remaining distance and reach the top of the well.
Show me your id card
Relocation related questions
Which tech you are using
Some questions around projects
What's the famous food in the ongole ?
Who is your favorite hero ?
You are given an array “arr'' of integers. Your task is to find the contiguous subarray within the array which has the largest product of its elements. You have to report this maximum p...read more
You are given an array consisting of 'N' positive integers where each integer is either 0 or 1 or 2. Your task is to sort the given array in non-decreasing order.
Note :
1. The array consists of only ...read more
Q41. How to get the count of all text box in a web page?
To get the count of all text boxes in a web page, we can use Selenium's findElements() method with the input type 'text'.
Use Selenium's findElements() method to find all elements with the input type 'text'
Count the number of elements returned by the findElements() method
Return the count as the result
Q42. Two defined table and fetching data is done one table has 20 records of 20 students another table has 10 student information if i want to pick the common record how to pick?
Use SQL JOIN to fetch common records from two tables.
Use SQL JOIN to combine the two tables based on a common column (e.g. student ID).
Select the columns you want to retrieve from both tables.
Use the WHERE clause to filter out the records that are common between the two tables.
You are given an array of integers. You need to sort the array in ascending order using quick sort.
Quick sort is a divide and conquer algorithm in which we choose a pivot point and partition the arra...read more
Given a binary tree, print its bottom view from left to right. Assume, the left and the right child make a 45-degree angle with the parent.
A binary tree is a tree in which each parent...read more
Q45. are you aware by the formulas used in excel
Yes, I am aware of the formulas used in Excel.
I am familiar with basic formulas such as SUM, AVERAGE, MAX, MIN, etc.
I also know how to use more complex formulas such as VLOOKUP, IF statements, and nested functions.
I am comfortable with creating and using named ranges, and using functions with cell references.
I am also familiar with using Excel's built-in functions for statistical analysis and financial calculations.
Overall, I am confident in my ability to use Excel to perform...read more
Q46. 1. Type of documentation for computer system validation. 2.Please explain recent or current one software execution and computer sytem validation. 3. What is Security policy for GxP computerization system? 4.wha...
read moreTechnical Lead interview questions on computer system validation, documentation, security policy, data integrity, GAMP5, risk assessment, backup and restoration, software categories, and more.
Types of documentation for computer system validation
Recent/current software execution and computer system validation
Security policy for GxP computerization system
Traceability matrix and its purpose
ALCOA and ALCOA+ principles
Definition and importance of data integrity
Regulatory points fo...read more
You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string.
For example:
If the given string is: STR = "abcde". You h...read more
Q48. What is the difference between RDBMS and DBMS? Explain database with a real life example of database.
RDBMS is a type of DBMS that uses a relational model to store and manage data.
DBMS is a general term for any software that manages data
RDBMS uses tables with rows and columns to store data
RDBMS enforces relationships between tables using keys
Example: MySQL, Oracle, SQL Server
Example of a database: a customer database for a retail store
Q49. Write a code of Prime number which are printed in the Right angle triangle format.
Code to print prime numbers in right angle triangle format.
Create a function to check if a number is prime or not.
Use nested loops to print the numbers in right angle triangle format.
Start with the first prime number and keep adding prime numbers to the triangle.
Example: 2 3 5 7 11 13 17 19 23 29
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
Q51. What are different type of data structures and explain any 2 of them?
Data structures are ways to organize and store data. Two examples are arrays and linked lists.
Arrays are a collection of elements of the same data type, stored in contiguous memory locations.
Linked lists are a collection of nodes, each containing data and a reference to the next node in the list.
Q52. If you have given a 1 kg cake and you have given 3 chance to cut and you have to distribute among 8 people how will you do that? condition is that you have to distribute it equally among 8 people.
Divide 1 kg cake equally among 8 people in 3 cuts.
Cut the cake into 8 equal pieces using 2 cuts.
Stack the pieces and cut them in half using the third cut.
Distribute the 16 pieces among 8 people.
Given a binary tree. Print the Left View of the Tree.
Example :
If the input tree is as depicted in the picture:
The Left View of the tree will be: 2 35 2
Input format :
Elements in t...read more
It’s black friday and the supermarket near Ninja’s house is offering a special discount to every Nth customer that generates a bill. You are initially given 2 arrays, “PRODUCTS” and “PRICES” where “...read more
You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.
A cell is said to be connected to...read more
Q56. 1. Project description 2. Technologies used in recent project 3. What is dependency injection 4. Difference between Rest and Soap 5. Difference between Monolithic and Microservice 6. Features of Java 8 7. Progr...
read moreInterview questions for Software Engineer position
Describe recent project and technologies used
Explain dependency injection and differences between Rest and Soap
Differentiate Monolithic and Microservice architecture
List features of Java 8 and write programs using Java 8
Provide pseudo code for sorting a list of integers without using Java 8 sort method
Define functional interface and its annotation
Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:
1. get(key) - Return the value of the key if the key exists in the cache, ...read more
Ninja has recently joined the FBI. Ninja got some secret information ‘SECRET_INFORMATION’ which he wants to share with his team. But he can not send this information directly bec...read more
Q59. you have a train booking system.what will be the primary feature you will test?
The primary feature to test in a train booking system would be the booking process.
Test the ability to search for available trains and seats
Test the ability to select and reserve seats
Test the payment process
Test the confirmation and ticket generation process
Q60. What is the difference between Method and Function in programming language?
Method and Function are both blocks of code that perform a specific task, but the main difference is that a method is associated with an object while a function is not.
A method is called on an object, while a function is called independently.
A method can modify the state of an object, while a function cannot.
A method is defined within a class, while a function is defined outside of a class.
Example of a method: object.methodName()
Example of a function: functionName()
Q61. write program fibonacci series, write program using boolean, write class cast exceptn, singleton design pattern(like you have to jvm one have jdk 1.7 and other have jdk 1.8 how many instance created if one then...
read moreThis interview question covers various topics including programming, design patterns, data structures, and exception handling in Java.
Write a program to generate the Fibonacci series
Write a program using boolean variables
Explain the ClassCastException and how to handle it
Discuss the Singleton design pattern and its implementation with different JDK versions
Explain abstract classes and interfaces in your current project
Explain hashing in HashMap and the number of buckets
Differ...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
You have been given a text message. You have to return the Run-length Encoding of the given message.
Run-length encoding is a fast and simple method of encoding strings. The basic idea is to r...read more
Q64. What is a function and it's uses?
A function is a block of code that performs a specific task and can be called multiple times.
Functions help in modularizing code and making it reusable.
Functions can take parameters and return values.
Functions can be defined in different ways such as function declaration, function expression, arrow function, etc.
Examples of functions include Math.max(), console.log(), and document.getElementById().
Q65. Q1. Write a program to check whether the given String is pallindrome or not using two pointers approach in 3 mins?
Program to check if a given string is palindrome or not using two pointers approach.
Initialize two pointers, one at the start and one at the end of the string.
Compare the characters at both pointers and move them towards each other until they meet.
If all characters match, the string is a palindrome.
If any character doesn't match, the string is not a palindrome.
You are given an array of positive integers ‘ARR’ that represents the strengths of different “jutsus” (‘jutsu’ is a Japanese word for art i.e. ninja techniques) that a Ninja knows and can use to ...read more
You are given a 'N' * 'N' maze with a rat placed at 'MAZE[0][0]'. Find and print all paths that rat can follow to reach its destination i.e. 'MAZE['N' - 1]['N' - 1]'. Rat can move in any ...read more
Q68. What is class, encapsulation and other feature of OOP?
Class is a blueprint for creating objects, encapsulation is the process of hiding data and methods within a class.
Class is a template or blueprint that defines the properties and behaviors of an object.
Encapsulation is the process of bundling data and methods together within a class, hiding the internal details from the outside world.
Other features of OOP include inheritance, polymorphism, and abstraction.
Inheritance allows a class to inherit properties and methods from anoth...read more
Q69. 2.Difference between Union and union all,drop and Truncate,star schema and snowflake schema,Dimension table and fact table.
Union combines the result sets of two or more SELECT statements, while Union All combines all rows from two or more SELECT statements.
Union removes duplicate rows, while Union All does not.
Union requires the number and order of columns in all SELECT statements to be the same, while Union All does not have this requirement.
Example: SELECT column1 FROM table1 UNION SELECT column1 FROM table2;
Example: SELECT column1 FROM table1 UNION ALL SELECT column1 FROM table2;
Q70. 1] Introduction 2] Explain automation framework in you project 3] Difference between Smoke, Sanity & Regression 4] Scenario based questions 5] Defect severity vs priority 6] BDD, Cucumber 7] Selenium basic ques...
read moreInterview questions for Programmer Analyst role
Explained automation framework used in the project
Differentiated between Smoke, Sanity & Regression testing
Answered scenario-based questions
Discussed defect severity vs priority
Explained BDD and Cucumber
Answered basic questions on Selenium
You are given a sorted integer array' ARR' of size 'N'. You need to remove the duplicates from the array such that each element appears only once. Return the length of this ne...read more
Q72. Which type of Validation you will do at Landing and staging area.
At landing and staging area, I will perform data validation to ensure accuracy and completeness of data.
Validate data against source system
Check for missing or duplicate data
Verify data types and formats
Ensure data integrity and consistency
Perform data profiling and data quality checks
Q73. 1.Write a validation rule to bypass it for particular profile. 2.Write a trigger to update contact record upon account update. Write a soql query to fetch the contact records which do not have account.
Answering Salesforce Marketing Cloud Developer interview questions
To bypass validation rule for a particular profile, use the $Profile global variable in the rule formula
To update contact record upon account update, write a trigger on Account object and update related Contact records
To fetch contact records without account, use SOQL query with LEFT JOIN on Account object and WHERE clause to filter null values
Q74. Write a program to check whether a string starts with 's' and if it starts with it convert it into an array named anything and print that array one by one.
Program to check if a string starts with 's' and convert it to an array
Use string method startsWith() to check if the string starts with 's'
If it starts with 's', use split() method to convert it into an array
Loop through the array and print each element
Q75. What are different types of algorthim methods in machine learning?
There are various algorithm methods in machine learning, such as supervised learning, unsupervised learning, and reinforcement learning.
Supervised learning: Algorithms learn from labeled data to make predictions or classifications.
Unsupervised learning: Algorithms learn from unlabeled data to discover patterns or relationships.
Reinforcement learning: Algorithms learn through trial and error to maximize rewards.
Other methods include semi-supervised learning, transfer learning,...read more
Q76. What is the difference between object storage and block storage?
Object storage stores data as objects while block storage stores data as blocks.
Object storage is ideal for unstructured data like images, videos, and documents.
Block storage is ideal for structured data like databases and virtual machines.
Object storage uses unique identifiers to access data while block storage uses block addresses.
Object storage is more scalable and cost-effective than block storage.
Examples of object storage include Amazon S3 and Google Cloud Storage while...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
Q78. Tell us about NDAs/CDAs. What are the clauses?
NDAs/CDAs are legal agreements that protect confidential information shared between parties.
NDAs/CDAs stand for Non-Disclosure Agreements/Confidentiality Disclosure Agreements.
They are used to protect sensitive information from being disclosed to unauthorized parties.
The clauses in NDAs/CDAs typically include definitions of confidential information, obligations of the parties involved, duration of the agreement, and remedies for breach.
Examples of clauses in NDAs/CDAs include...read more
Q79. your name in a database is repeated multiple number of types.To reduce it or to remove redundancy what do you do?
To remove redundancy in a database with repeated names, use normalization techniques.
Identify the primary key of the table and ensure it is unique
Create separate tables for related data to avoid repeating information
Use foreign keys to link related tables
Consider using indexing to improve performance
Update existing data to conform to the new structure
Q80. 1.Four pillars of OOPS concepts with real time example and have you used in your project or not? 2.Abstract class and interfaces with realtime example 3.Finalise and dispose method 4.Garbage collection in c# 5....
read moreInterview questions for Project Associate position covering OOPS concepts, MVC, ADO.NET, and SQL.
Four pillars of OOPS: Abstraction, Encapsulation, Inheritance, Polymorphism
Abstract class: Cannot be instantiated, can have abstract and non-abstract methods
Interfaces: Contract that defines a set of methods, can be implemented by classes
Finalize method: Called by garbage collector before object is destroyed
Dispose method: Used to release unmanaged resources, should be called expl...read more
Q81. If i want to select uncommon records which does not match how to pick?
To select uncommon records that do not match, use the NOT IN or NOT EXISTS clause in SQL.
Use the NOT IN clause to select records that do not match a specific list of values.
Use the NOT EXISTS clause to select records that do not have a matching record in a subquery.
Example: SELECT * FROM table_name WHERE column_name NOT IN (value1, value2);
Example: SELECT * FROM table1 WHERE NOT EXISTS (SELECT * FROM table2 WHERE table1.id = table2.id);
You live in Dubai and had an infinite supply of oil and a 5 liters and 3 liters jar,
how would you measure exactly 4 liters (of-course in minimum numbers of step) ?
Q83. Write a program to display most frequent element in an array using Streams and Lambda expression. Difference between ArrayList and HashSet. What is the use of default method in interface? Difference between Str...
read moreAnswers to technical interview questions on Java programming language.
To display most frequent element in an array using Streams and Lambda expression, use Collectors.groupingBy() and Collectors.counting() methods.
ArrayList is an ordered collection of elements while HashSet is an unordered collection of unique elements.
Default methods in interface are used to provide a default implementation of a method that can be overridden by implementing classes.
StringBuffer is synchroniz...read more
Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.
Example :
Merge Sort Algorithm - Merge sort is a Div...read more
Q85. 1. Different types of schemas 2. Different types of slowly changing dimensions with real time examples used in our previous projects 3. Layers of ETL Testing and questions related to Staging layers 4. Report te...
read moreInterview questions for Senior Associate position in ETL Testing
Different types of schemas in ETL
Examples of slowly changing dimensions
Layers of ETL Testing and questions related to Staging layers
Types of reports and dashboard for report testing
Handling P1 defects in defect cycle
SQL queries with different scenarios
Q86. How do you change region your deployed AWS EC2 instance?
To change region of deployed AWS EC2 instance, create an AMI of the instance and launch it in the desired region.
Create an AMI of the instance in the current region
Copy the AMI to the desired region
Launch the copied AMI in the desired region
Q87. Do you know 4 pillars of OOP? Explain.
The 4 pillars of OOP are Abstraction, Encapsulation, Inheritance, and Polymorphism.
Abstraction: Hiding implementation details and showing only necessary information.
Encapsulation: Binding data and functions together to prevent external interference.
Inheritance: Creating new classes from existing ones, inheriting properties and methods.
Polymorphism: Using a single interface to represent multiple types of objects.
You have a birthday cake and have to cut it into 8 equal pieces by making 3 cuts only. How do you do it?
Q89. Explain me about OOPS Concepts. Write a program in C++ to calculate Fibonacci Series. Write a program in C ++ to calculate Factorial. What is Call by value, Call by reference? Explain abstraction, encapsulation...
read moreOOPS Concepts, Fibonacci Series, Factorial, Call by value/reference, Abstraction, Encapsulation, Polymorphism, Switch, Router, Hub, OSI Model
OOPS Concepts include inheritance, polymorphism, encapsulation, and abstraction
Example of Fibonacci Series program: int fib(int n) { return (n <= 1) ? n : fib(n-1) + fib(n-2); }
Example of Factorial program: int fact(int n) { return (n == 1 || n == 0) ? 1 : n * fact(n-1); }
Call by value passes a copy of the variable, while call by referen...read more
Q90. Technical: SQL queries of join b/w three tables Sorting in descending order c program Full c code to print helloworld Little data structure,dbms Weakness HR: any movies or series recently watched and explain th...
read moreThe question asks for SQL queries for joining three tables, sorting in descending order in C program, and printing 'Hello, World!' in C.
To join three tables in SQL, use the JOIN keyword with appropriate conditions.
To sort in descending order in C, use the qsort() function with a custom comparison function.
To print 'Hello, World!' in C, use the printf() function with the desired message.
Q91. What is the difference between variable and object?
Variables are names given to memory locations while objects are instances of a class with attributes and methods.
Variables are used to store values while objects are used to represent real-world entities.
Variables can be reassigned to different values while objects have a fixed identity.
Variables are created when they are assigned a value while objects are created using constructors.
Variables can be of different data types while objects are instances of a specific class.
Examp...read more
Q92. How do you avoid re-rendering of a component? With useEffect second parameter, should ComponentUpdate
To avoid re-rendering, use shouldComponentUpdate or React.memo
Use shouldComponentUpdate to compare current and next props/state
Use React.memo to memoize functional components
Use useMemo to memoize expensive computations
Use useCallback to memoize event handlers
Use PureComponent for class components
Q93. If there are 10 ball 2 red, 5 blue ,3 orange and one ball is picked randomly what is probability that the ball picked is red?
What is the probability of picking a red ball out of 10 balls with 2 red, 5 blue, and 3 orange?
There are 2 red balls out of 10 total balls
The probability of picking a red ball is 2/10 or 1/5
The probability can also be expressed as 20%
Q94. What are availability zones and regions in AWS?
Availability zones and regions are geographical locations in AWS data centers.
Availability zones are isolated locations within a region that contain their own power, cooling, and networking infrastructure.
Regions are separate geographic areas that consist of two or more availability zones.
Each region is completely independent and isolated from the others.
Customers can deploy resources in multiple availability zones to achieve high availability and fault tolerance.
Examples of ...read more
Q95. How to solve the problem if your team mate is underperforming
Address underperformance of team mate by identifying root cause and providing support.
Have a conversation with the team mate to understand the root cause of underperformance
Provide support and resources to help the team mate improve
Set clear expectations and goals for the team mate
Monitor progress and provide feedback regularly
Consider involving a supervisor or HR if the issue persists
Q96. Where do you rate your programming skills on a scale of 1 to 10?
I rate my programming skills at 8 out of 10.
I have experience in multiple programming languages such as Java, Python, and C++.
I have completed several projects including a web application and a mobile app.
I am constantly learning and improving my skills through online courses and personal projects.
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
Q98. Imagine there are 7 people in the room and there are 7 apples in the basket. Everyone took one apple still one left in the basket. How?
One apple is still left in the basket because one of the people in the room is the owner of the basket and did not take an apple.
One person in the room is the owner of the basket
The owner did not take an apple
Hence, one apple is still left in the basket
Q99. What is S3? What are the difference classes in S3?
S3 is a cloud-based object storage service provided by Amazon Web Services (AWS).
S3 stands for Simple Storage Service.
It allows users to store and retrieve data from anywhere on the web.
S3 offers different storage classes such as Standard, Infrequent Access, and Glacier.
Standard is for frequently accessed data, Infrequent Access is for data that is accessed less frequently, and Glacier is for long-term archival storage.
S3 also provides features like versioning, lifecycle poli...read more
Create a class named Person with a string variable 'name' and an integer variable 'age,' such that these variables are not accessible outside the class and implement a way to initialize the va...read more
More about working at Cognizant
Top HR Questions asked in null
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month