i
Cognizant
Filter interviews by
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
Custom hooks in React are reusable functions that allow you to extract component logic into separate functions for better code organization and reusability.
Custom hooks are created using the 'use' prefix and can be used to share logic between components.
Use cases for custom hooks include fetching data from an API, handling form state, managing local storage, and more.
Example of a custom hook for API call: const useFetc...
useMemo is used to memoize a value, while useCallback is used to memoize a function.
useMemo is used to memoize a value and recompute it only when its dependencies change.
useCallback is used to memoize a callback function and prevent unnecessary re-renders.
Example: useMemo can be used to memoize the result of a complex computation, while useCallback can be used to memoize an event handler function.
Class-based components use ES6 classes and have lifecycle methods, while functional components are simpler and use functions.
Class-based components use ES6 classes to create components, while functional components are created using functions.
Class-based components have lifecycle methods like componentDidMount and componentDidUpdate, while functional components do not.
Functional components are simpler and more lightweig...
Implementing the lifecycle of a React component in a functional component
Use the useEffect hook to replicate lifecycle methods like componentDidMount, componentDidUpdate, and componentWillUnmount
Pass an empty array as the second argument to useEffect to mimic componentDidMount
Pass a variable or state as the second argument to useEffect to mimic componentDidUpdate
Return a cleanup function inside useEffect to mimic compo
Various state management techniques in React include Context API, Redux, and local state.
Context API: React's built-in solution for passing data through the component tree without having to pass props down manually at every level.
Redux: A popular state management library for React applications, allowing for a centralized store to manage application state.
Local state: Managing state within individual components using us
Redux is a predictable state container for JavaScript apps. Middlewares are functions that intercept actions before they reach the reducer.
Redux follows a unidirectional data flow architecture.
Middlewares in Redux are functions that can intercept, modify, or dispatch actions.
Common use cases for middlewares include logging, asynchronous API calls, and handling side effects.
Examples of popular Redux middlewares are Redu...
Hoisting in JavaScript is the behavior where variable and function declarations are moved to the top of their containing scope during the compilation phase.
Variable declarations are hoisted to the top of their scope, but not their initializations.
Function declarations are fully hoisted, meaning they can be called before they are declared.
Hoisting can lead to unexpected behavior if not understood properly.
Event bubbling is the propagation of events from the target element up through its ancestors in the DOM tree.
Events triggered on a child element will 'bubble up' and trigger on parent elements.
Event listeners can be attached to parent elements to handle events from multiple child elements.
Stopping event propagation can be done using event.stopPropagation() or event.stopImmediatePropagation().
Block scope and function scope are two types of scopes in JavaScript that determine the visibility and accessibility of variables.
Block scope refers to the visibility of variables within a block of code enclosed by curly braces. Variables declared with 'let' and 'const' have block scope.
Function scope refers to the visibility of variables within a function. Variables declared with 'var' have function scope.
Variables de...
Yes, I have experience working with semantic tags in HTML.
Used semantic tags like <header>, <nav>, <main>, <section>, <article>, <aside>, <footer> for better structure and SEO.
Understand the importance of using semantic tags for accessibility and search engine optimization.
Semantic tags help in organizing content and making it more readable for developers and browsers.
Various methods for creating an object in JavaScript include object literals, constructor functions, ES6 classes, and Object.create() method.
Object literals: var obj = { key: value };
Constructor functions: function ObjectName() { this.key = value; } var obj = new ObjectName();
ES6 classes: class ClassName { constructor() { this.key = value; } } var obj = new ClassName();
Object.create() method: var obj = Object.create(pr
Shallow copy only copies the references of nested objects, while deep copy creates new copies of nested objects.
Shallow copy creates a new object but does not create copies of nested objects, only copies their references.
Deep copy creates a new object and also creates new copies of all nested objects.
Shallow copy can be achieved using Object.assign() or spread operator, while deep copy can be achieved using JSON.parse(
The code will throw an error because 'a' is declared but not initialized.
The code will result in a ReferenceError because 'a' is declared but not assigned a value.
Variables declared with 'const' must be initialized at the time of declaration.
Initializing 'a' with a value before calling test() will prevent the error.
CSS can be used to arrange elements in a row and column layout using flexbox or grid layout properties.
Use display: flex; for a row layout and display: flex; flex-direction: column; for a column layout
Use justify-content and align-items properties to align items in the main axis and cross axis respectively
For grid layout, use display: grid; and grid-template-columns or grid-template-rows to define the layout
Yes, I have utilized CSS preprocessors such as SASS and LESS.
I have experience using SASS to streamline my CSS workflow by utilizing variables, mixins, and nesting.
I have also worked with LESS to improve code organization and maintainability through features like variables and functions.
The color applied will be based on the specificity of the selector, with ID having higher specificity than class.
ID has higher specificity than class in CSS
Color applied will be based on the selector with higher specificity
Example: If ID selector has color red and class selector has color blue, the color applied will be red
I applied via Referral and was interviewed in Dec 2024. There was 1 interview round.
I applied via Walk-in and was interviewed in Nov 2024. There were 2 interview rounds.
I am a Senior Automation Test Engineer with 5+ years of experience in designing and implementing automated testing frameworks.
5+ years of experience in automation testing
Proficient in designing and implementing automated testing frameworks
Strong knowledge of testing tools like Selenium, Appium, and JUnit
Experience in creating test scripts and executing test cases
Ability to analyze test results and identify defects
The syntax for using driver.findElement in Selenium is driver.findElement(By locator)
Use driver.findElement(By locator) to locate a single element on the web page
Specify the locator strategy (e.g. By.id, By.name, By.xpath) to identify the element
Example: WebElement element = driver.findElement(By.id("username"));
Different types of assertions and syntax for hard assertion in TestNG
Types of assertions: Hard assertions and Soft assertions
Syntax for hard assertion in TestNG: Assert.assertEquals(expected, actual)
Types of wait mechanisms include implicit wait, explicit wait, fluent wait, and thread.sleep.
Implicit wait: Waits for a certain amount of time before throwing a NoSuchElementException.
Explicit wait: Waits for a certain condition to occur before proceeding further.
Fluent wait: Waits for a condition to be true with a specified polling frequency.
Thread.sleep: Pauses the execution for a specified amount of time.
Frames in Selenium can be managed using switchTo() method to navigate between frames.
Use driver.switchTo().frame() method to switch to a frame by index, name or WebElement
Use driver.switchTo().defaultContent() method to switch back to the main content
Use driver.switchTo().parentFrame() method to switch to the parent frame
Use a Set data structure to remove duplicates from an array of strings.
Create a Set from the array to automatically remove duplicates
Convert the Set back to an array to get the unique values
List, Set, and Map are different types of collections in Java used to store and manipulate groups of objects.
List is an ordered collection that allows duplicate elements. Example: ArrayList, LinkedList
Set is a collection that does not allow duplicate elements. Example: HashSet, TreeSet
Map is a collection of key-value pairs where each key is unique. Example: HashMap, TreeMap
I would analyze the user stories and application functionality to identify the root cause of the mismatch and work towards resolving it.
Review the user stories and application functionality to understand the discrepancies
Communicate with stakeholders to clarify requirements and expectations
Update test cases and automation scripts to align with the corrected user stories
Collaborate with developers to address any underly
I have over 5 years of experience in automation testing, with a focus on creating and executing test scripts for web applications.
Developing automation test scripts using tools like Selenium and TestNG
Creating test plans and test cases based on requirements
Executing test cases and reporting defects
Collaborating with developers and QA team to ensure quality of the product
Participating in Agile ceremonies such as sprint
Demonstrating feature file step definitions with different sets of data in a previous project scenario
Create a feature file with a scenario outline that includes placeholders for different sets of data
Write step definitions that use the placeholders to run the scenario with different data sets
Use data tables or examples in the feature file to provide the different sets of data
Run the scenario with different data sets t...
To count URLs in an HTML page using Selenium and open the URL containing your name, you can use a combination of Selenium WebDriver methods and regular expressions.
Use Selenium WebDriver to navigate to the HTML page and retrieve its source code
Use regular expressions to identify and count the URLs in the source code
Iterate through the list of URLs to find the one containing your name
Use Selenium WebDriver to open the U
Use regular expressions to separate letters and digits from a string in Java.
Use the String class's split() method with a regular expression to separate letters and digits.
Create a regular expression pattern that matches either letters or digits.
Store the separated letters and digits in separate arrays.
What people are saying about Cognizant
I applied via AmbitionBox and was interviewed in Dec 2024. There were 2 interview rounds.
Cognizant interview questions for popular designations
I applied via Company Website and was interviewed in Sep 2024. There was 1 interview round.
Average time should be considered during performance analysis with ST03 transaction.
Average time gives a more accurate representation of overall performance compared to total time.
Total time can be skewed by outliers or extreme values, while average time provides a more balanced view.
For example, if there are a few long-running processes that significantly impact total time, focusing on average time can help identify o
Minimize downtime during SAP upgrade with SUM by using parallel processing, proper planning, and testing.
Utilize parallel processing to speed up the upgrade process
Properly plan and schedule the upgrade during off-peak hours to minimize impact on users
Perform thorough testing in a non-production environment before the actual upgrade
Use SAP EarlyWatch Alert to identify potential issues before the upgrade
Implement SAP Sy...
R3trans and R3load processes are used during SAP upgrade using SUM for data migration and transport.
R3trans is used for transporting data between systems during the upgrade process.
R3load is used for loading data into the upgraded system.
R3trans and R3load are part of the Software Update Manager (SUM) tool used for SAP upgrades.
SUM 2.0 is an updated version of SUM 1.0 with improved features. SUM 2.0 cannot be used for SAP JAVA systems due to compatibility issues.
SUM 2.0 has enhanced functionalities and better performance compared to SUM 1.0
SUM 2.0 is not compatible with SAP JAVA systems because it lacks support for certain Java-specific components and processes
Using SUM 2.0 for SAP JAVA systems can lead to errors and issues during the upgrade
Check prerequisites, resolve issues, update software components, check system status, and re-run maintenance planner.
Check if all prerequisites are met before running maintenance planner
Resolve any issues or errors that are causing the maintenance planner to not be green
Update software components if necessary
Check the system status to ensure it is stable and running properly
Re-run the maintenance planner after addressi
Delta Merge in SAP HANA is a process where data from delta storage is merged into main storage to optimize performance.
Delta merge is a process in SAP HANA where data from delta storage is merged into main storage to optimize performance.
It helps in reducing the size of delta storage and improving query performance.
Delta merge is triggered automatically by SAP HANA based on certain conditions like memory consumption or...
Delta merge may not run properly due to incorrect configuration, insufficient resources, or system errors.
Check the configuration settings for delta merge to ensure they are correct
Ensure that there are enough resources (memory, CPU, disk space) available for delta merge to run smoothly
Monitor system logs for any errors or issues that may be preventing delta merge from running properly
Restart the system or the relevant...
Pre-requisites for manual delta merge include proper system backup, sufficient disk space, and no active users.
Ensure system backup is taken before performing manual delta merge.
Make sure there is enough disk space available for the merge process.
Ensure there are no active users or critical processes running during the merge.
Check for any pending updates or patches that may interfere with the merge.
Verify that all nece...
Strust is a transaction code used in SAP for managing SSL server PSEs. Different PSEs are used for different purposes.
Strust is used to manage SSL server PSEs in SAP systems
Different PSEs are used for different purposes such as encryption, authentication, etc.
Examples of PSEs include SSL server PSE, SSL client PSE, SNC PSE, etc.
To connect a 3rd party system with SAP, steps include creating RFC destination, configuring communication user, setting up authorizations, and exchanging certificates.
Create RFC destination in SAP system
Configure communication user in SAP system
Set up necessary authorizations for the RFC user
Exchange certificates between the 3rd party system and SAP system
Trusted RFC connections are secure connections between SAP systems for communication.
Trusted RFC connections are used to establish secure communication between SAP systems.
These connections are needed to ensure data integrity and confidentiality during data exchange.
To create trusted RFC connections, you need to configure the RFC destination in both sending and receiving systems.
You also need to maintain the trusted re...
Yes, it is possible to automate TR movement from DEV to QA.
Use transport management system (TMS) in SAP to automate TR movement
Set up transport routes and configure TMS to automatically release and import transports
Schedule background jobs to move transports at specific times
Use transport of copies (TOC) functionality to copy transports between systems
Label printers are specialized printers used to print labels for various purposes.
Label printers are designed specifically for printing labels, tags, and stickers.
They are commonly used in industries like manufacturing, retail, logistics, and healthcare.
Label printers use different types of printing technologies such as direct thermal or thermal transfer.
Unlike usual printers, label printers are more durable and can ha...
Possible reasons for performance issue between 1 to 2 PM everyday and how to resolve it
Check for any scheduled jobs or backups running during that time causing high system load
Monitor system resources like CPU, memory, and disk usage during that time
Review system logs for any errors or warnings occurring at that specific time
Consider implementing performance tuning measures such as optimizing database queries or increa...
Different tcodes for traces in SAP BASIS and specific information to look for in STAD
ST01 - System Trace: Monitor user activities and authorization checks
ST05 - Performance Trace: Analyze performance issues
ST11 - Display Developer Traces: View developer traces for debugging
ST12 - SAP System Trace Configuration: Configure trace settings
ST22 - ABAP Dump Analysis: Check for ABAP dumps and errors
TMS in SAP HANA manages transport requests for system changes, similar to SAP JAVA. It ensures controlled deployment of changes.
TMS in SAP HANA is used to manage transport requests for system changes, ensuring controlled deployment.
It allows for organizing changes into packages, moving them between systems, and tracking changes.
TMS in SAP JAVA also serves a similar purpose, managing transport requests for Java-based sy...
Domain link in SAP is a logical link between a domain and a data element.
Domain link is used to assign a domain to a data element in SAP.
It helps in defining the characteristics and constraints of the data element.
Domain link ensures consistency and reusability of domain definitions.
Example: Linking a domain 'Material Number' to a data element 'MATNR' in SAP.
Yes, it is possible to add another transport layer between QA and Prod systems.
Yes, you can add an additional transport layer between QA and Prod systems in SAP by creating a new transport route.
This can be achieved by configuring a new transport layer in the landscape configuration.
The new transport layer can be used to control the flow of transports between QA and Prod systems separately.
This setup allows for better ...
A single HANA node can have a maximum memory of 24 TB.
A single HANA node can have a maximum memory of 24 TB.
The memory capacity of a HANA node can vary depending on the hardware configuration.
For example, a HANA node with 2 TB RAM per socket can have up to 12 sockets, resulting in a total memory capacity of 24 TB.
Yes, ECC on HANA can have scaleout scenario.
ECC on HANA can be scaled out by adding additional application servers to distribute workload.
Scaleout scenario helps in improving performance and handling increased workload.
It allows for horizontal scaling by adding more servers to the existing landscape.
Example: Adding more application servers to an ECC on HANA system to handle increased user load.
SAP Software Update Manager (SUM) offers various strategies for system updates and upgrades.
Downtime-minimized strategy: Reduces system downtime during updates by performing most of the activities online.
Standard strategy: Follows the traditional update process with downtime for the system.
Maintenance planner strategy: Uses SAP Maintenance Planner tool to plan updates and upgrades.
Stack XML strategy: Allows importing s...
Sizing of SAP and HANA involves determining the hardware requirements based on the workload and usage patterns.
Sizing involves analyzing the current and future workload of the SAP system.
Factors such as number of users, transactions, data volume, and growth projections are considered.
Tools like SAP Quick Sizer and SAP HANA Sizing reports are used to estimate hardware requirements.
Proper sizing ensures optimal performan
Approximately 1.5 TB of memory is needed for a HANA system with 1TB of database.
HANA systems typically require 1.5 times the size of the database in memory for optimal performance
In this case, with a 1TB database, approximately 1.5 TB of memory would be needed
Memory requirements may vary based on specific configurations and usage patterns
HANA Cockpit is a web-based tool for administration and monitoring, while HANA Studio is a desktop application for development and modeling.
HANA Cockpit is web-based, accessible via a browser, while HANA Studio is a desktop application.
HANA Cockpit is used for administration, monitoring, and performance tuning, while HANA Studio is used for development, modeling, and data provisioning.
HANA Cockpit provides a centralize...
Yes, in SAP HANA it is possible to create multiple files for backup instead of one big file.
Yes, in SAP HANA, you can split the backup into multiple files for easier management and storage.
This can be achieved by specifying the number of backup files and their sizes during the backup process.
For example, you can create 10 files of 100 GB each for a total backup size of 1 TB.
SAP HANA 2.0 SPS 05 is the latest version available on SAP Marketplace.
SAP HANA 2.0 SPS 05 was released in May 2020.
It includes new features and enhancements for improved performance and usability.
Customers can download the latest version from the SAP Marketplace.
To install SAP HANA license for Tenant DB, use HDBLCM tool and apply the licenses in a specific sequence.
Use HDBLCM tool to install SAP HANA license for Tenant DB
Apply the licenses in the following sequence: System DB, Tenant DB, and then XS Advanced
Ensure that the license key is valid and matches the hardware key of the system
Get interview-ready with Top Cognizant Interview Questions
I was interviewed in Jan 2025.
It was easy, bacis aptitude questions asked in this round
I applied via Walk-in and was interviewed in Nov 2024. There were 3 interview rounds.
Optimization techniques in Apache Spark improve performance and efficiency.
Partitioning data to distribute work evenly
Caching frequently accessed data in memory
Using broadcast variables for small lookup tables
Optimizing shuffle operations by reducing data movement
Applying predicate pushdown to filter data early
Coalesce reduces the number of partitions without shuffling data, while repartition increases the number of partitions by shuffling data. Cache and persist are used to persist RDDs in memory.
Coalesce is used to reduce the number of partitions without shuffling data, while repartition is used to increase the number of partitions by shuffling data.
Coalesce is more efficient when reducing partitions as it avoids shuffling...
SQL query to find the second highest rank in a dataset
Use the ORDER BY clause to sort the ranks in descending order
Use the LIMIT and OFFSET clauses to skip the highest rank and retrieve the second highest rank
Example: SELECT rank FROM dataset ORDER BY rank DESC LIMIT 1 OFFSET 1
The SQL code for calculating year-on-year growth percentage with year-wise grouping.
Use the LAG function to get the previous year's value
Calculate the growth percentage using the formula: ((current year value - previous year value) / previous year value) * 100
Group by year to get year-wise growth percentage
To connect Google Cloud Platform with Apache Spark, tools like Dataproc, Cloud Storage, and BigQuery can be used.
Use Google Cloud Dataproc to create managed Spark and Hadoop clusters on GCP.
Store data in Google Cloud Storage and access it from Spark applications.
Utilize Google BigQuery for querying and analyzing large datasets directly from Spark.
Orchestrating code in GCP involves using tools like Cloud Composer or Cloud Dataflow to schedule and manage workflows.
Use Cloud Composer to create, schedule, and monitor workflows using Apache Airflow
Utilize Cloud Dataflow for real-time data processing and batch processing tasks
Use Cloud Functions for event-driven serverless functions
Leverage Cloud Scheduler for job scheduling
Integrate with other GCP services like BigQ...
I applied via Company Website and was interviewed in Nov 2024. There were 3 interview rounds.
Standard quantitative questions accompanied by logical reasoning and related topics.
OOP concepts include encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
Inheritance: Allows a class to inherit properties and behavior from another class.
Polymorphism: Objects of different classes can be treated as objects of a common superclass.
Abstraction: Hides complex implementation details and only shows the necessa
React is a JavaScript library for building user interfaces.
React allows developers to create reusable UI components.
It uses a virtual DOM for efficient rendering.
React uses a declarative approach to define how the UI should look based on the application state.
It supports server-side rendering for improved performance.
React can be used with other libraries like Redux for state management.
I am a software engineer with a passion for coding and problem-solving. I come from a close-knit family with supportive parents and siblings.
Software engineer with coding and problem-solving skills
Close-knit family with supportive parents and siblings
My strengths include problem-solving and teamwork, while my weaknesses are time management and public speaking. I am addressing my weaknesses by taking time management courses and practicing public speaking.
Strengths: problem-solving, teamwork
Weaknesses: time management, public speaking
Addressing weaknesses: taking time management courses, practicing public speaking
Some of the top questions asked at the Cognizant interview -
The duration of Cognizant interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 4.2k interviews
Interview experience
based on 49.9k reviews
Rating in categories
Hyderabad / Secunderabad,
Chennai
+14-9 Yrs
Not Disclosed
Hyderabad / Secunderabad,
Chennai
+14-9 Yrs
Not Disclosed
Hyderabad / Secunderabad,
Chennai
+14-9 Yrs
Not Disclosed
Associate
72.2k
salaries
| ₹5.1 L/yr - ₹16 L/yr |
Programmer Analyst
55.5k
salaries
| ₹2.4 L/yr - ₹9.5 L/yr |
Senior Associate
48.6k
salaries
| ₹9 L/yr - ₹27.3 L/yr |
Senior Processing Executive
28.9k
salaries
| ₹1.8 L/yr - ₹9 L/yr |
Technical Lead
17.6k
salaries
| ₹5.9 L/yr - ₹24.7 L/yr |
TCS
Infosys
Wipro
Accenture