Add office photos
Engaged Employer

Cognizant

3.8
based on 47k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

2500+ Interview Questions and Answers

Updated 16 Dec 2024
Popular Designations

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 more
Ans.

Interview 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

View 10 more answers
Q2. Nth Fibonacci Number

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

View 7 more answers
Q3. Pair Sum

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
View 4 more answers

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

Ans.

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

View 6 more answers
Discover null interview dos and don'ts from real experiences

Q5. What is meant by quality and brief explanation of it with an example?

Ans.

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

View 60 more answers

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 more
Ans.

Calculate 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.

View 4 more answers
Are these interview questions helpful?
Q7. Alien dictionary

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

View 2 more answers
Q8. Buy and Sell Stock - III

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

View 3 more answers
Share interview questions and help millions of jobseekers 🌟

Q9. What is stack? How do you convert a queue to stack?

Ans.

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

View 4 more answers

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 ?

Ans.

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

Add your answer

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 more
Ans.

Java 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

Add your answer
Q12. Minimum steps to reach target by a Knight

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

View 2 more answers

Q13. Tell me the logic of program to reverse a given string word by word without using any built in function.

Ans.

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.

View 8 more answers

Q14. What do you mean by BPO and what do you understand by the term of insurance

Ans.

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

View 22 more answers
Q15. NINJA ATTACK

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

View 4 more answers

Q16. What’s breach? What happens if either party breaches a contract?

Ans.

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

View 11 more answers

Q17. 2.What programming language are you proficient with..?

Ans.

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

View 14 more answers
Q18. Maximum Difference

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

View 2 more answers

Q19. What is the function of spark plug in diesel engine?

Ans.

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

View 6 more answers
Q20. Ninja And Stops

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

View 3 more answers
Q21. Merge Intervals

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

View 3 more answers
Q22. Ways To Make Coin Change

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

View 4 more answers

Q23. How to decide whether to use "call" or "apply" in javascript?

Ans.

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.

View 8 more answers

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 more
Ans.

Interview 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

View 1 answer
Q25. Next Greater Element

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

View 3 more answers

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 more
Ans.

Answers 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

Add your answer
Q27. Pairwise Sum of Hamming Distance

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

View 2 more answers

Q28. If we have 200 staging tables, 40 dimensions tables and 20 facts table, How will you compare it with target systems

Ans.

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

View 2 more answers
Q29. DFS Traversal

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

View 2 more answers

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)

Ans.

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.

View 3 more answers

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 more
Ans.

Answering 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

Add your answer

Q32. Why is java platform independent?

Ans.

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.

View 11 more answers
Q33. Star 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 
Add your answer

Q34. WHAT YOU KNOW HEALTH CARE DOMAIN IN THE US SYSTEM?

Ans.

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

View 7 more answers

Q35. What is the difference between structure and class?

Ans.

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; }

View 2 more answers

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 more
Ans.

Answering 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.

Add your answer

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 more
Ans.

The 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.

View 1 answer
Q38. Basic HR Questions

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 ?

View 2 more answers
Q39. Maximum Product Subarray

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

View 4 more answers
Q40. Sort Array

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
View 2 more answers

Q41. How to get the count of all text box in a web page?

Ans.

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

View 5 more answers

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?

Ans.

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.

Add your answer
Q43. Quick Sort

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

View 4 more answers
Q44. Bottom view of binary tree

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

View 3 more answers

Q45. are you aware by the formulas used in excel

Ans.

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

View 20 more answers

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 more
Ans.

Technical 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

Add your answer
Q47. Reverse the String

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
Add your answer

Q48. What is the difference between RDBMS and DBMS? Explain database with a real life example of database.

Ans.

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

Add your answer

Q49. Write a code of Prime number which are printed in the Right angle triangle format.

Ans.

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

View 1 answer
Q50. Sum of Digits

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

View 2 more answers

Q51. What are different type of data structures and explain any 2 of them?

Ans.

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.

View 3 more answers

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.

Ans.

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.

View 1 answer
Q53. Left View Of Binary Tree

Given a binary tree. Print the Left View of the Tree.

Example :
If the input tree is as depicted in the picture: 

alt text

The Left View of the tree will be: 2 35 2 
Input format :
Elements in t...read more
View 2 more answers
Q54. Black Friday

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

Add your answer
Q55. Find Number Of Islands

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

View 2 more answers

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 more
Ans.

Interview 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

Add your answer
Q57. LRU Cache Implementation

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
View 2 more answers
Q58. Ninja And His Secret Information

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

Add your answer

Q59. you have a train booking system.what will be the primary feature you will test?

Ans.

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

View 4 more answers

Q60. What is the difference between Method and Function in programming language?

Ans.

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()

View 1 answer

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 more
Ans.

This 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

View 3 more answers
Q62. String Palindrome

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
Add your answer
Q63. Encode the Message

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

Add your answer

Q64. What is a function and it's uses?

Ans.

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().

View 6 more answers

Q65. Q1. Write a program to check whether the given String is pallindrome or not using two pointers approach in 3 mins?

Ans.

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.

View 2 more answers
Q66. Subarray Sums I

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

View 2 more answers
Q67. Rat In a Maze All Paths

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

View 2 more answers

Q68. What is class, encapsulation and other feature of OOP?

Ans.

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

View 2 more answers

Q69. 2.Difference between Union and union all,drop and Truncate,star schema and snowflake schema,Dimension table and fact table.

Ans.

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;

View 1 answer

Q70. 1] Introduction 2] Explain automation framework in you project 3] Difference between Smoke, Sanity &amp; Regression 4] Scenario based questions 5] Defect severity vs priority 6] BDD, Cucumber 7] Selenium basic ques...

read more
Ans.

Interview 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

Add your answer
Q71. Remove Duplicates from Sorted Array

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

View 2 more answers

Q72. Which type of Validation you will do at Landing and staging area.

Ans.

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

View 1 answer

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.

Ans.

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

Add your answer

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.

Ans.

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

Add your answer

Q75. What are different types of algorthim methods in machine learning?

Ans.

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

View 4 more answers

Q76. What is the difference between object storage and block storage?

Ans.

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

Add your answer
Q77. Technical Questions

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

Add your answer

Q78. Tell us about NDAs/CDAs. What are the clauses?

Ans.

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

View 4 more answers

Q79. your name in a database is repeated multiple number of types.To reduce it or to remove redundancy what do you do?

Ans.

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

View 1 answer

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 more
Ans.

Interview 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

Add your answer

Q81. If i want to select uncommon records which does not match how to pick?

Ans.

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);

Add your answer
Q82. Puzzle

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) ?

Add your answer

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 more
Ans.

Answers 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

Add your answer
Q84. Merge Sort

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
View 2 more answers

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 more
Ans.

Interview 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

Add your answer

Q86. How do you change region your deployed AWS EC2 instance?

Ans.

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

Add your answer

Q87. Do you know 4 pillars of OOP? Explain.

Ans.

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.

View 2 more answers
Q88. Puzzle

You have a birthday cake and have to cut it into 8 equal pieces by making 3 cuts only. How do you do it?

Add your answer

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 more
Ans.

OOPS 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

Add your answer

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 more
Ans.

The 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.

View 1 answer

Q91. What is the difference between variable and object?

Ans.

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

View 2 more answers

Q92. How do you avoid re-rendering of a component? With useEffect second parameter, should ComponentUpdate

Ans.

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

Add your answer

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?

Ans.

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%

View 1 answer

Q94. What are availability zones and regions in AWS?

Ans.

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

Add your answer

Q95. How to solve the problem if your team mate is underperforming

Ans.

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

View 4 more answers

Q96. Where do you rate your programming skills on a scale of 1 to 10?

Ans.

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.

Add your answer
Q97. Check Palindrome

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

Add your answer

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?

Ans.

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

View 1 answer

Q99. What is S3? What are the difference classes in S3?

Ans.

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

Add your answer
Q100. Print Name and age

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

Add your answer
1
2
3
4
5
6
7

More about working at Cognizant

Top Rated Mega Company - 2024
Top Rated IT/ITES Company - 2024
HQ - Teaneck. New Jersey., United States (USA)
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Top Cognizant Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter