Add office photos
Engaged Employer

Cognizant

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

100+ Interview Questions and Answers

Updated 20 Nov 2024
Popular Designations

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

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

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

Q4. Write a program to find the sum of the squares of each term of Fibonacci series

Ans.

Program to find the sum of squares of each term of Fibonacci series

  • Generate Fibonacci series using loop or recursion

  • Calculate square of each term

  • Add all squares to get the sum

View 1 answer
Discover null interview dos and don'ts from real experiences

Q5. Which programming language do you know?

Ans.

I know multiple programming languages including Java, Python, and C++.

  • Proficient in Java with experience in developing web applications using Spring framework

  • Familiar with Python for data analysis and machine learning

  • Experience in C++ for developing high-performance applications

  • Also familiar with HTML, CSS, and JavaScript for front-end development

View 2 more answers

Q6. Why can we update internal values of objects defined with const in javascript?

Ans.

Internal values of const objects can be updated in JavaScript due to the nature of const keyword.

  • The const keyword only prevents reassignment of the variable identifier, not the object itself.

  • Internal values of objects can be modified without reassigning the object.

  • This behavior is different from other programming languages where const objects are completely immutable.

View 1 answer
Are these interview questions helpful?

Q7. Informatica Powercenter grid Difference between Joiner and lookup Difference between router and filter What is mapplet and it's limitations Session Partitioning Scenario based questions and Unix and SQL questio...

read more
Ans.

Explaining differences between Informatica Powercenter grid components and concepts

  • Joiner combines data from two sources based on a common key, while Lookup retrieves data from a reference table based on a matching key

  • Router sends data to different targets based on specified conditions, while Filter removes rows from a data set based on specified criteria

  • Mapplet is a reusable object that contains a set of transformations, but has limitations such as not being able to use dyna...read more

View 1 answer

Q8. How to create Threads and what all are the ways to create threads?

Ans.

Creating threads in programming and the different ways to do so.

  • Threads can be created by extending the Thread class and overriding the run() method.

  • Threads can also be created by implementing the Runnable interface and passing it to a Thread object.

  • Java 8 introduced the concept of creating threads using lambda expressions.

  • Thread pools can be used to manage a group of threads.

  • Examples: Thread t1 = new Thread(); t1.start();

  • Examples: class MyThread extends Thread { public void ...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. what is class variable and what is instance variable

Ans.

Class variables are shared among all instances of a class while instance variables are unique to each instance.

  • Class variables are defined within the class but outside of any methods.

  • Instance variables are defined within a class's methods and are unique to each instance.

  • Class variables are accessed using the class name while instance variables are accessed using the instance name.

  • Example of class variable: count = 0 (used to keep track of the number of instances created)

  • Examp...read more

Add your answer

Q10. What are some practical usages of IIFE?

Ans.

IIFE (Immediately Invoked Function Expression) is used to create a private scope and avoid global namespace pollution.

  • IIFE can be used to create modules in JavaScript.

  • It can also be used to avoid naming conflicts in code.

  • IIFE can be used to create closures and maintain state.

  • It can be used to execute code immediately without the need for a function call.

  • IIFE can be used to pass arguments to a function without exposing them to the global scope.

View 2 more answers

Q11. What Is the probability of it raining today in Chennai?

Ans.

The probability of rain in Chennai today depends on various factors such as season, weather conditions, and location.

  • The probability can be estimated by analyzing the current weather patterns and historical data.

  • Factors such as humidity, temperature, and wind speed can affect the probability of rain.

  • Local weather forecasts and satellite imagery can also provide insights into the likelihood of rain.

  • The probability of rain can range from 0% to 100%, with higher probabilities in...read more

Add your answer

Q12. What is executequery, execute scalar, executenon query in SQL

Ans.

executequery, execute scalar, executenon query are SQL methods for executing queries.

  • ExecuteQuery is used to execute a SELECT statement and returns a ResultSet object.

  • ExecuteScalar is used to execute a SELECT statement that returns a single value.

  • ExecuteNonQuery is used to execute INSERT, UPDATE, DELETE statements and returns the number of rows affected.

Add your answer

Q13. What are various ISO standard which I have implemented

Ans.

I have implemented ISO 9001, ISO 14001, and ISO 27001 standards.

  • Implemented ISO 9001 for quality management systems

  • Implemented ISO 14001 for environmental management systems

  • Implemented ISO 27001 for information security management systems

Add your answer

Q14. How should we traverse a tree ideally?

Ans.

Traversing a tree involves visiting each node in a specific order.

  • Choose a traversal method based on the problem requirements

  • Depth-first search (DFS) and breadth-first search (BFS) are common methods

  • DFS can be implemented using recursion or a stack

  • BFS can be implemented using a queue

  • Examples: inorder, preorder, postorder, level-order

  • Consider the time and space complexity of each method

View 1 answer

Q15. What are custom directives? What are their types? How to create with general example?

Ans.

Custom directives are a way to extend HTML with new attributes and functionality.

  • Types of custom directives are attribute, element, and class directives.

  • Attribute directives modify the behavior of existing HTML elements.

  • Element directives create new HTML elements.

  • Class directives modify the behavior of existing HTML elements based on their class.

  • To create a custom directive, use the directive() method of the AngularJS module.

  • Example: creating a custom attribute directive to c...read more

Add your answer

Q16. Explain about types of State management in client and server side

Ans.

State management in client and server side

  • Client-side state management: cookies, local storage, session storage, and query parameters

  • Server-side state management: session state and application state

  • Cookies are small text files stored on the client's computer

  • Local storage and session storage are HTML5 web storage APIs

  • Session state is stored on the server and associated with a user's session

  • Application state is stored on the server and shared across all users

Add your answer

Q17. Why state management techniques are required ?

Ans.

State management techniques are required to manage the state of an application and ensure data consistency.

  • State management helps in maintaining the state of an application and ensures that data is consistent across different components.

  • It helps in managing complex applications with multiple components and data sources.

  • State management techniques like Redux, MobX, and Context API provide a centralized store for managing application state.

  • They also provide tools for debugging ...read more

Add your answer

Q18. What is temporal dead zone in javascript?

Ans.

Temporal dead zone is a behavior in JavaScript where a variable cannot be accessed before it is declared.

  • Variables declared with let and const are hoisted but cannot be accessed before their declaration.

  • This behavior helps in avoiding errors due to accessing variables before they are initialized.

  • Example: console.log(x); // ReferenceError: x is not defined let x = 10;

  • Temporal dead zone only applies to block-scoped variables declared with let and const.

Add your answer

Q19. How to solve runtime error where selenium is not able to create an instance of webdriver

Ans.

To solve a runtime error where Selenium is not able to create an instance of WebDriver, check for correct WebDriver setup and dependencies.

  • Ensure that the correct WebDriver executable path is set in the system PATH variable

  • Check if the WebDriver executable is compatible with the browser version being used

  • Verify that all necessary dependencies for the WebDriver are installed

  • Consider updating the WebDriver and browser to the latest versions

  • Check for any conflicting browser exte...read more

Add your answer

Q20. Write a program to print only first 5 prime numbers in a finite series. Why and when do we use Stack/queue

Ans.

Program to print first 5 prime numbers in a series

  • Use a loop to iterate through the series

  • Check if each number is prime

  • Print the first 5 prime numbers found

  • Use Sieve of Eratosthenes for better performance

Add your answer

Q21. ApI testing- Challenges faced in API testing, different methods and protocols used in postman, different error codes

Ans.

API testing challenges, methods and error codes in Postman

  • Challenges include testing for authentication, authorization, input validation, and error handling

  • Methods used in Postman include GET, POST, PUT, DELETE, PATCH, and OPTIONS

  • Protocols used include HTTP, HTTPS, and REST

  • Error codes include 200 for success, 400 for bad request, 401 for unauthorized, 404 for not found, and 500 for internal server error

Add your answer

Q22. Find the probability that India will win the next Cricket World Cup

Ans.

It is impossible to accurately predict the probability of India winning the next Cricket World Cup.

  • Sports events are unpredictable and depend on various factors such as team performance, weather conditions, injuries, etc.

  • Past performance of the team and individual players can be considered, but it does not guarantee future success.

  • Other teams participating in the tournament also play a significant role in determining the probability of India winning.

  • Therefore, it is not possi...read more

Add your answer

Q23. What is 'inproc' in state management?

Ans.

Inproc is a state management mode where data is stored in the application's memory.

  • Inproc stands for 'in-process'.

  • Data is stored in the application's memory, making it fast to access.

  • This mode is suitable for small applications with low traffic.

  • If the application is restarted, all data stored in inproc mode is lost.

  • Examples of inproc state management include ASP.NET's in-process session state and Cache API.

View 1 answer

Q24. What is React, how it is different from other frameworks?

Ans.

React is a JavaScript library for building user interfaces, known for its component-based architecture and virtual DOM.

  • React is a JavaScript library, not a full-fledged framework like Angular or Vue.

  • React uses a virtual DOM to improve performance by minimizing actual DOM manipulations.

  • React follows a component-based architecture, where UI is broken down into reusable components.

  • React allows for easy state management and data flow through props.

  • React is maintained by Facebook ...read more

Add your answer

Q25. How do you create a XML publisher report in Oracle EBS

Ans.

To create a XML publisher report in Oracle EBS, you need to define a data template and a layout template.

  • Define a data template by creating an RTF template with data definitions and mappings.

  • Upload the data template to the XML Publisher Administrator responsibility in Oracle EBS.

  • Define a layout template by creating an RTF template with the desired report layout.

  • Associate the data template and layout template to create the XML publisher report.

  • Run the concurrent program to gen...read more

Add your answer

Q26. 1) How we can maintain dependency injection in .net core?

Ans.

Dependency injection in .NET Core can be maintained through built-in DI container or third-party containers.

  • Use built-in DI container by registering services in Startup.cs file

  • Use third-party containers like Autofac, Ninject, etc. for more advanced scenarios

  • Avoid using static classes or singletons to prevent tight coupling

  • Use constructor injection to ensure loose coupling and testability

Add your answer

Q27. How to do global error handling in angular?

Ans.

Global error handling in Angular can be done using ErrorHandler class.

  • Create a class that implements the ErrorHandler interface

  • Override the handleError() method to handle errors globally

  • Provide the ErrorHandler class in the providers array of AppModule

  • Use the error handling service to log errors or display error messages

Add your answer

Q28. 1. what are the 4 main divisions in COBOL. Explain each 2. Explain VSAM Define? 3. what is the purpose of file status clause in Select statement

Ans.

COBOL main divisions are Identification Division, Environment Division, Data Division, and Procedure Division. VSAM Define is used to define the structure of a VSAM file. File status clause in Select statement is used to handle file operations.

  • Identification Division - contains program name and author information

  • Environment Division - specifies the environment in which the program will run

  • Data Division - defines the data structures used in the program

  • Procedure Division - cont...read more

Add your answer

Q29. tell me oops concepts and how can you use these in real life

Ans.

Object-oriented programming concepts like inheritance, encapsulation, polymorphism, and abstraction can be used in real life to organize and structure code efficiently.

  • Inheritance allows for code reusability by creating a new class that inherits properties and methods from an existing class.

  • Encapsulation helps in bundling data and methods that operate on the data into a single unit, protecting data from outside interference.

  • Polymorphism enables objects to be treated as instan...read more

Add your answer

Q30. ES6 Features, Difference between Arrow Function and Normal function expression This keyword

Ans.

Arrow functions are concise syntax for writing functions in ES6. They do not have their own 'this' keyword.

  • Arrow functions do not have their own 'this' keyword, they inherit 'this' from the parent scope.

  • Normal function expressions have their own 'this' keyword, which is determined by how the function is called.

  • Arrow functions are more concise and have implicit return, while normal functions require explicit return statement.

Add your answer

Q31. Selenium- Types of exceptions, limitations, Types of waits used in selenium, types of locators

Ans.

Answering questions related to Selenium

  • Types of exceptions in Selenium include NoSuchElementException, TimeoutException, and ElementNotVisibleException

  • Limitations of Selenium include difficulty testing CAPTCHA, inability to test desktop applications, and difficulty testing mobile applications

  • Types of waits used in Selenium include implicit wait, explicit wait, and fluent wait

  • Types of locators in Selenium include ID, name, class name, tag name, link text, and partial link text

Add your answer

Q32. Difference between Functional Interface and Normal Interface

Ans.

Functional Interface has only one abstract method while Normal Interface can have multiple abstract methods.

  • Functional Interface is used for lambda expressions and method references.

  • Normal Interface can have default and static methods along with abstract methods.

  • Example of Functional Interface: java.util.function.Predicate

  • Example of Normal Interface: java.util.List

Add your answer

Q33. 1) How to use the ORMs in .net application?

Ans.

ORMs in .NET simplify database operations by mapping objects to database tables.

  • ORMs like Entity Framework and NHibernate provide a higher level of abstraction for database operations.

  • They allow developers to work with objects instead of writing SQL queries.

  • ORMs handle database connections, transactions, and mapping of objects to tables.

  • Developers can use LINQ to query data from the database.

  • ORMs also provide caching and lazy loading to improve performance.

  • Example: Entity Fra...read more

Add your answer

Q34. what is difference between overriding and overloading

Ans.

Overriding is when a subclass provides a specific implementation for a method that is already provided by its parent class, while overloading is when multiple methods have the same name but different parameters.

  • Overriding involves changing the method implementation in a subclass, while overloading involves having multiple methods with the same name but different parameters.

  • Overriding is used for runtime polymorphism, while overloading is used for compile-time polymorphism.

  • Exa...read more

Add your answer

Q35. Project implementation ,challenges faces and how to overcome challnges

Ans.

Project implementation challenges and overcoming them

  • Identifying potential risks and challenges

  • Creating a detailed project plan

  • Effective communication and collaboration

  • Adapting to changes and being flexible

  • Monitoring progress and making necessary adjustments

  • Building a strong team and assigning roles

  • Seeking expert advice and guidance

  • Learning from past experiences and lessons

  • Implementing risk mitigation strategies

  • Regularly reviewing and evaluating the project

Add your answer

Q36. How do you find if table has any duplicates

Ans.

To find if a table has any duplicates, you can use the GROUP BY clause with the COUNT function.

  • Use the GROUP BY clause to group the rows by the columns that you want to check for duplicates.

  • Use the COUNT function to count the number of occurrences of each group.

  • If the count is greater than 1, it means there are duplicates in the table.

Add your answer

Q37. Css precendence and priotization in web

Add your answer

Q38. What do you mean by supporting application's

Ans.

Supporting applications refers to providing assistance and maintenance for software programs.

  • Supporting applications involves troubleshooting and resolving issues that users encounter while using the software.

  • It includes providing technical support, answering user queries, and assisting with software updates and upgrades.

  • Supporting applications also involves monitoring the performance of the software and ensuring its smooth operation.

  • Examples of supporting applications includ...read more

Add your answer

Q39. What are the scenario where you used pivot table?

Ans.

Pivot tables are used to summarize and analyze large datasets in a structured manner.

  • Used to analyze sales data by product, region, and time period

  • Helps in identifying trends and patterns in data

  • Used to compare and contrast data from different perspectives

  • Enables easy filtering and sorting of data

  • Assists in creating meaningful reports and visualizations

Add your answer

Q40. what is semantic html

Add your answer

Q41. what are object in JS

Add your answer

Q42. Why Parquet words faster on Spark ?

Ans.

Parquet words faster on Spark due to its columnar storage format and efficient compression techniques.

  • Parquet is a columnar storage format that organizes data by columns rather than rows.

  • Columnar storage allows for better compression and efficient data retrieval.

  • Parquet uses compression techniques like run-length encoding and dictionary encoding.

  • Spark leverages the columnar storage format of Parquet to perform predicate pushdown and column pruning.

  • Parquet also supports predic...read more

Add your answer

Q43. Difference between rank and dense_rank, with examples

Ans.

Rank assigns unique numbers to each row, while dense_rank assigns consecutive numbers to rows with the same values.

  • Rank function assigns a unique number to each row based on the order specified.

  • Dense_rank function assigns consecutive numbers to rows with the same values.

  • Rank and dense_rank are used in SQL queries to rank rows based on certain criteria.

  • Rank and dense_rank can be used to find top N records or identify duplicates in a dataset.

Add your answer

Q44. What is oops? Explain all characteristics of oops.

Ans.

Oops stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.

  • Oops is based on the four main principles: Inheritance, Encapsulation, Abstraction, and Polymorphism.

  • Inheritance allows a class to inherit properties and behavior from another class.

  • Encapsulation refers to the bundling of data with the methods that operate on that data.

  • Abstraction focuses on ...read more

Add your answer

Q45. Biggest company in india

Ans.

Reliance Industries Limited is currently the biggest company in India.

  • Reliance Industries Limited is a conglomerate with interests in petrochemicals, refining, oil, and gas exploration.

  • It was founded by Dhirubhai Ambani in 1966 and is currently run by his son Mukesh Ambani.

  • Reliance Industries Limited is also the second-largest company in Asia by market capitalization.

  • Other major companies in India include Tata Group, State Bank of India, and Indian Oil Corporation.

View 2 more answers

Q46. What is difference between traits and fragments

Ans.

Traits are reusable components that can be mixed into different classes, while fragments are reusable UI components in Android development.

  • Traits are used in object-oriented programming languages like Scala and PHP to enable multiple inheritance by allowing a class to inherit methods from multiple traits.

  • Fragments are used in Android development to modularize and reuse UI components across different activities or fragments.

  • Traits are typically used for code reusability and to...read more

Add your answer

Q47. Find the most repeated number array Armstrong number

Ans.

The most repeated number in an array is the Armstrong number.

  • Armstrong number is a number that is equal to the sum of its own digits raised to the power of the number of digits.

  • To find the most repeated Armstrong number in an array, calculate the sum of digits raised to the power of the number of digits for each number and compare the result with the original number.

  • Example: 153 is an Armstrong number as 1^3 + 5^3 + 3^3 = 153.

Add your answer

Q48. Analytical functions in PL-SQL. Data dictionary tables in Oracle

Ans.

Analytical functions in PL-SQL are used to perform calculations across a set of rows. Data dictionary tables in Oracle store metadata about the database.

  • Analytical functions in PL-SQL allow for calculations to be performed on a set of rows, typically used in reporting and data analysis.

  • Examples of analytical functions include ROW_NUMBER, RANK, DENSE_RANK, and LAG/LEAD.

  • Data dictionary tables in Oracle store information about the database, such as tables, columns, indexes, and ...read more

Add your answer

Q49. Types of Join. Difference between view and materialized view.

Ans.

Types of joins include inner, outer, left, right, and full. Views are virtual tables while materialized views store data physically.

  • Types of joins: inner, outer, left, right, full

  • Views are virtual tables that do not store data physically

  • Materialized views store data physically for faster access

  • Views are updated dynamically while materialized views need to be refreshed manually

Add your answer

Q50. name a gem you have recently used

Ans.

I recently used the gem 'devise' for user authentication in a Rails project.

  • Devise is a popular gem for user authentication in Rails applications.

  • It provides a lot of built-in functionality such as user registration, login, and password reset.

  • Devise also allows for customization and configuration to fit specific project needs.

  • Example: I used Devise to create a secure login system for a social media platform.

  • Example: Devise also has support for multiple authentication models s...read more

Add your answer

Q51. 1.what is rspec?

Ans.

RSpec is a testing tool for Ruby programming language.

  • RSpec is a behavior-driven development (BDD) framework.

  • It allows developers to write tests that describe the expected behavior of the code.

  • RSpec provides a domain-specific language (DSL) for writing tests.

  • It can be used for unit testing, integration testing, and acceptance testing.

  • RSpec is widely used in the Ruby community and is considered a standard tool for testing Ruby code.

Add your answer

Q52. How you will take care of multiple task

Ans.

I will prioritize tasks, create a schedule, delegate when necessary, and stay organized.

  • Prioritize tasks based on urgency and importance

  • Create a schedule or to-do list to keep track of tasks

  • Delegate tasks to others when possible

  • Stay organized by using tools like calendars or project management software

Add your answer

Q53. What is the oops concept??

Ans.

OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of objects.

  • OOPs focuses on creating objects that contain both data and functions to manipulate that data.

  • It emphasizes on encapsulation, inheritance, and polymorphism.

  • Encapsulation is the process of hiding the implementation details of an object from the outside world.

  • Inheritance allows a class to inherit properties and methods from another class.

  • Polymorphism allows objects of different classes ...read more

View 1 answer

Q54. Difference between clustered and non clustered index

Ans.

Clustered index physically reorders the data on disk, while non-clustered index creates a separate structure.

  • Clustered index determines the physical order of data rows in a table, while non-clustered index does not.

  • Clustered index is faster for retrieval of large ranges of data, while non-clustered index is faster for retrieval of individual rows.

  • A table can have only one clustered index, but multiple non-clustered indexes.

  • Example: Primary key in a table is usually implemente...read more

Add your answer

Q55. What is nodejs and it’s advantage

Ans.

Node.js is a runtime environment that allows you to run JavaScript on the server side.

  • Node.js is built on Chrome's V8 JavaScript engine

  • It uses an event-driven, non-blocking I/O model which makes it lightweight and efficient

  • Node.js is commonly used for building scalable network applications and real-time web applications

Add your answer

Q56. What are types of operator in python?

Ans.

Types of operators in Python include arithmetic, comparison, logical, assignment, bitwise, membership, and identity operators.

  • Arithmetic operators perform mathematical operations (+, -, *, /, %, **, //)

  • Comparison operators compare values (==, !=, >, <, >=, <=)

  • Logical operators perform logical operations (and, or, not)

  • Assignment operators assign values (=, +=, -=, *=, /=, %=, **=, //=)

  • Bitwise operators perform bitwise operations (&, |, ^, ~, <<, >>)

  • Membership operators test fo...read more

Add your answer

Q57. What is my expected CTC

Ans.

My expected CTC is negotiable and depends on the company's offer, my experience, skills, and the market standards.

  • My expected CTC is based on my experience and skills in the industry.

  • I am open to negotiation based on the company's offer and market standards.

  • I have researched the average salary range for this position in the industry.

  • I am looking for a competitive salary package that reflects my qualifications and contributions.

Add your answer

Q58. Why we use redux

Add your answer

Q59. Explain the Framework of the project

Ans.

The project framework is the structure that outlines the project's goals, tasks, and resources.

  • The framework includes the project's scope, objectives, and deliverables.

  • It also outlines the project's timeline, budget, and resources needed.

  • The framework serves as a guide for project management and helps ensure project success.

  • Examples of project frameworks include Agile, Waterfall, and Scrum methodologies.

Add your answer

Q60. Difference between different versions of selenium

Ans.

Different versions of Selenium include Selenium IDE, Selenium WebDriver, and Selenium Grid.

  • Selenium IDE is a record and playback tool for creating automated tests in the browser.

  • Selenium WebDriver is a tool for writing automated tests in various programming languages.

  • Selenium Grid allows for running tests on different machines in parallel.

  • Each version has its own strengths and weaknesses, and the choice of version depends on the specific testing needs.

  • For example, Selenium ID...read more

Add your answer

Q61. State Management in React- states and props

Ans.

State management in React involves managing the state and props of components.

  • State is used to manage data that changes within a component

  • Props are used to pass data from a parent component to a child component

  • State can be updated using setState() method

  • Props are read-only and cannot be modified within a component

  • State and props are used together to create dynamic and interactive UIs

Add your answer

Q62. Linked list traversal and finding an element.

Ans.

Traversing a linked list involves iterating through each node to find a specific element.

  • Start at the head of the linked list

  • Iterate through each node by following the 'next' pointer

  • Compare the value of each node with the target element

  • Stop when the target element is found or reach the end of the list

Add your answer

Q63. Alternative join strategy for full outer join

Ans.

An alternative join strategy for full outer join is to use a combination of left and right outer joins.

  • Perform a left outer join to include all rows from the left table and matching rows from the right table

  • Perform a right outer join to include all rows from the right table and matching rows from the left table

  • Combine the results of the left and right outer joins to get the full outer join

Add your answer

Q64. What will you do if cpu usage is high?

Ans.

I would investigate the root cause of the high CPU usage and take appropriate actions to optimize performance.

  • Check for any resource-intensive processes running on the system

  • Monitor system performance metrics to identify any patterns or trends

  • Consider scaling up resources or optimizing code to improve efficiency

Add your answer

Q65. What is JVM?

Ans.

JVM stands for Java Virtual Machine. It is an abstract machine that enables a computer to run Java programs.

  • JVM is responsible for interpreting the compiled Java code and executing it on the computer.

  • It provides a platform-independent environment for Java programs to run on different operating systems.

  • JVM has various components like class loader, bytecode verifier, and execution engine.

  • Examples of JVM-based languages include Kotlin, Scala, and Groovy.

View 1 answer

Q66. Why are you switching current org

Ans.

Seeking new challenges and growth opportunities in a different environment.

  • Looking for new challenges and opportunities for growth

  • Interested in exploring different work environments and cultures

  • Seeking to expand skill set and knowledge in a different organization

Add your answer

Q67. Hash map working and concurrent hash map working and difference

Ans.

Hash map and concurrent hash map are data structures used for storing key-value pairs, with the main difference being concurrency support in the latter.

  • Hash map is a basic data structure that stores key-value pairs and allows for efficient retrieval of values based on keys.

  • Concurrent hash map is a thread-safe version of hash map, designed for use in concurrent environments where multiple threads may access and modify the map simultaneously.

  • The main difference between hash map...read more

Add your answer

Q68. Disadvantages of viewstate technique ?

Ans.

Viewstate technique can lead to performance issues and security vulnerabilities.

  • Viewstate increases the size of the page, leading to slower load times.

  • Viewstate can be tampered with, leading to security vulnerabilities.

  • Viewstate is stored on the client side, leading to potential data privacy issues.

  • Viewstate can cause issues with scalability in web applications.

  • Alternative techniques like session state or caching can be used instead.

Add your answer

Q69. How to deliver projects on time

Ans.

To deliver projects on time, it is important to set clear timelines, prioritize tasks, communicate effectively, and regularly monitor progress.

  • Set clear project timelines and deadlines

  • Prioritize tasks based on importance and urgency

  • Communicate effectively with team members and stakeholders

  • Regularly monitor progress and make adjustments as needed

Add your answer

Q70. What is default method in java 8

Ans.

Default method in Java 8 allows interfaces to have method implementations.

  • Introduced in Java 8 to provide backward compatibility for interfaces

  • Allows interfaces to have method implementations without affecting implementing classes

  • Used to add new methods to interfaces without breaking existing code

  • Default methods are marked with the 'default' keyword

  • Example: default void myMethod() { // method implementation }

Add your answer

Q71. What is redux and explain the workflow

Ans.

Redux is a predictable state container for JavaScript apps. It helps manage the state of an application in a single immutable state tree.

  • Redux is commonly used with React to manage the state of components.

  • It follows a unidirectional data flow, where actions are dispatched to update the state.

  • Reducers are pure functions that specify how the state changes in response to actions.

  • The state is stored in a single immutable state tree, making it easier to track changes and debug.

  • Red...read more

Add your answer

Q72. difference between module and class

Ans.

A module is a file containing Python definitions and statements. A class is a blueprint for creating objects.

  • A module can have multiple classes and functions.

  • A class can have multiple methods and attributes.

  • Modules are used for organizing code and avoiding naming conflicts.

  • Classes are used for creating objects with similar properties and behaviors.

  • Modules are imported using the import statement.

  • Classes are instantiated using the class name followed by parentheses.

Add your answer

Q73. How does angular application works?

Ans.

Angular applications work by utilizing components, services, modules, and dependency injection to create dynamic web applications.

  • Angular applications are built using components, which are reusable building blocks for the UI.

  • Services in Angular are used for encapsulating reusable logic that can be shared across components.

  • Modules in Angular help organize the application into cohesive blocks of functionality.

  • Dependency injection in Angular allows for the injection of dependenc...read more

Add your answer

Q74. What is Byte code?

Ans.

Byte code is a compiled code that can be executed on any platform with the help of a virtual machine.

  • Byte code is an intermediate code that is generated by a compiler.

  • It is platform-independent and can be executed on any platform with the help of a virtual machine.

  • Examples of virtual machines include Java Virtual Machine (JVM) and .NET Common Language Runtime (CLR).

View 1 answer

Q75. Tell me about recent technologies

Ans.

Recent technologies include artificial intelligence, blockchain, Internet of Things, and virtual reality.

  • Artificial intelligence (AI) is being used in various industries for automation and decision-making processes.

  • Blockchain technology is revolutionizing secure transactions and data storage.

  • Internet of Things (IoT) connects devices to the internet for remote monitoring and control.

  • Virtual reality (VR) is creating immersive experiences in gaming, training, and entertainment.

Add your answer

Q76. what are CTE in sql ?

Ans.

CTE stands for Common Table Expressions in SQL, which are temporary result sets that can be referenced within a SELECT, INSERT, UPDATE, or DELETE statement.

  • CTEs are defined using the WITH keyword followed by a name for the CTE and a SELECT statement that defines the result set.

  • They can be used to simplify complex queries, improve readability, and avoid repeating the same subquery multiple times.

  • CTEs are particularly useful for recursive queries where a query references itself...read more

Add your answer

Q77. Difference between StringBuffer and StringBuilder

Ans.

StringBuffer is synchronized while StringBuilder is not.

  • StringBuffer is thread-safe while StringBuilder is not.

  • StringBuffer is slower than StringBuilder due to synchronization.

  • StringBuilder is preferred for single-threaded environments.

  • Both classes are used for manipulating strings.

  • Example: StringBuffer sb = new StringBuffer("Hello");

  • Example: StringBuilder sb = new StringBuilder("Hello");

Add your answer

Q78. What are pipes in angular?

Ans.

Pipes are a feature in Angular that allow for data transformation before displaying it in the view.

  • Pipes are used to format data in the view

  • They can be used to filter, sort, and transform data

  • Examples include the date pipe, currency pipe, and uppercase pipe

Add your answer

Q79. Write a .small C code

Ans.

A C code that prints out the elements of an array of strings.

  • Declare an array of strings

  • Use a loop to iterate through the array

  • Print out each element

Add your answer

Q80. Difference between abstraction and encapsulation

Ans.

Abstraction focuses on hiding the implementation details while encapsulation focuses on bundling the data and methods that operate on the data into a single unit.

  • Abstraction is the concept of hiding the complex implementation details and showing only the necessary features of an object. For example, a car can be abstracted as a vehicle with properties like speed and color, without showing the internal working of the engine.

  • Encapsulation is the bundling of data and methods tha...read more

Add your answer

Q81. A brief explanation of Ajax ?

Ans.

Ajax is a technique for creating fast and dynamic web pages without reloading the entire page.

  • Ajax stands for Asynchronous JavaScript and XML

  • It allows for asynchronous communication between the client and server

  • It can update parts of a web page without requiring a full page reload

  • Examples of Ajax include auto-suggest search bars and real-time chat applications

Add your answer

Q82. Write a code for reversing a word.

Ans.

Code for reversing a word

  • Create an empty string variable

  • Loop through the characters of the word in reverse order

  • Add each character to the empty string variable

  • Return the reversed word

Add your answer

Q83. write pattern program in C language

Ans.

Pattern program in C language using loops and conditional statements.

  • Use nested loops to print the desired pattern

  • Utilize conditional statements to control the pattern output

  • Experiment with different loop structures to create various patterns

Add your answer

Q84. Joining strategy of table A - table B

Ans.

The joining strategy of table A and table B is the method used to combine the data from both tables based on a common column.

  • The joining strategy can be specified using different types such as inner join, left join, right join, and full outer join.

  • Inner join returns only the matching rows from both tables based on the common column.

  • Left join returns all the rows from the left table and the matching rows from the right table.

  • Right join returns all the rows from the right table...read more

Add your answer

Q85. All Java 8 new features

Ans.

Java 8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods.

  • Lambda expressions allow you to pass functionality as an argument to a method.

  • Functional interfaces have a single abstract method and can be used with lambda expressions.

  • Streams provide a way to work with sequences of elements efficiently.

  • Default methods allow interfaces to have method implementations.

  • Some other features include the new Date and Time API, N...read more

Add your answer

Q86. Why string is immutable

Ans.

String is immutable because it cannot be changed once created.

  • Immutable objects are safer to use in multi-threaded environments

  • String pool in Java is possible because of immutability

  • StringBuffer and StringBuilder classes are used for mutable strings

Add your answer

Q87. How to take screenshot?

Ans.

To take a screenshot, use the appropriate keyboard shortcuts or built-in tools on your device.

  • On Windows, press 'PrtScn' key to capture entire screen or 'Alt + PrtScn' for active window.

  • On Mac, press 'Command + Shift + 3' to capture entire screen or 'Command + Shift + 4' for selected area.

  • On smartphones, press 'Power + Volume Down' buttons simultaneously to take a screenshot.

  • Use built-in screenshot tools on devices like Snipping Tool on Windows or Grab on Mac.

Add your answer

Q88. Inline attribute in html ?

Ans.

Inline attribute is used to apply styles to a single element in HTML.

  • Inline attribute is defined within the opening tag of an element

  • It is used to apply styles to a single element

  • It has lower specificity than internal or external stylesheets

  • Example:

    This text is red

Add your answer

Q89. Difference between HashMap and HashSet

Ans.

HashMap is a key-value pair collection while HashSet is a set of unique elements.

  • HashMap allows duplicate values but not duplicate keys

  • HashSet does not allow duplicate elements

  • HashMap uses key to retrieve values while HashSet uses contains() method to check if an element exists

  • Example: HashMap - {1=apple, 2=banana, 3=apple}, HashSet - {apple, banana}

  • HashMap implements Map interface while HashSet implements Set interface

Add your answer

Q90. Difference between abstract class and interface

Ans.

Abstract class is a class that can have both abstract and non-abstract methods while interface only has abstract methods.

  • Abstract class can have constructors while interface cannot

  • A class can implement multiple interfaces but can only inherit from one abstract class

  • Abstract class can have instance variables while interface cannot

  • Abstract class is used when we want to provide a common behavior for all the subclasses while interface is used when we want to provide a common beha...read more

Add your answer

Q91. Tell me about agile methodology

Ans.

Agile methodology is a project management approach that emphasizes flexibility, collaboration, and iterative development.

  • Agile focuses on delivering value to customers through continuous planning, feedback, and adaptation.

  • It involves breaking down projects into smaller, manageable tasks called sprints.

  • Teams work closely together and with stakeholders to prioritize tasks and make quick decisions.

  • Common agile frameworks include Scrum, Kanban, and Extreme Programming (XP).

Add your answer

Q92. What is your Expected CTC?

Ans.

My expected CTC is based on my experience, skills, and industry standards.

  • My expected CTC is in line with the market rate for the position

  • I have taken into consideration my years of experience and expertise in the field

  • I am open to negotiation based on the overall compensation package offered

Add your answer

Q93. How to group and add data

Ans.

Grouping and adding data involves organizing data into categories and performing mathematical operations to calculate totals.

  • Group data based on a common attribute or criteria

  • Use aggregation functions like SUM, COUNT, or AVERAGE to add data within each group

  • Examples: Grouping sales data by region and calculating total sales for each region

  • Examples: Grouping student data by grade level and calculating average test scores for each grade

Add your answer

Q94. what is mean abstract class?

Ans.

Abstract class is a class that cannot be instantiated and may contain abstract methods.

  • Cannot be instantiated directly

  • May contain abstract methods that must be implemented by subclasses

  • Used to define a common interface for subclasses

Add your answer

Q95. What is OOPs in programming.

Ans.

OOPs stands for Object-Oriented Programming, a programming paradigm based on the concept of objects.

  • OOPs focuses on creating objects that contain data and methods to manipulate that data.

  • Encapsulation, inheritance, and polymorphism are key principles of OOPs.

  • Examples of OOP languages include Java, C++, and Python.

Add your answer

Q96. 1. What are microservices

Ans.

Microservices are small, independent, and modular services that work together to form a larger application.

  • Microservices are designed to be loosely coupled and independently deployable.

  • Each microservice performs a specific task and communicates with other microservices through APIs.

  • Microservices allow for greater flexibility, scalability, and resilience in software development.

  • Examples of companies that use microservices include Netflix, Amazon, and Uber.

Add your answer

Q97. Find duplicate word from list of string

Ans.

Find duplicate word from list of string

  • Split the string into words

  • Use a hash table to keep track of word occurrences

  • Return the duplicate word(s)

Add your answer

Q98. What are functions and class

Ans.

Functions and classes are fundamental concepts in object-oriented programming.

  • Functions are blocks of code that perform a specific task and can be called multiple times.

  • Classes are blueprints for creating objects, which are instances of a class.

  • Classes can have attributes (variables) and methods (functions) associated with them.

  • Example: Function to calculate the area of a circle, Class 'Circle' with attributes 'radius' and methods 'calculate_area'.

Add your answer

Q99. What is nodejs modules

Ans.

Node.js modules are reusable blocks of code that encapsulate related functionality and can be easily imported into a Node.js application.

  • Node.js modules help organize code into separate files for better maintainability

  • Modules can be imported using the 'require' function

  • Modules can export functions, objects, or variables for use in other parts of the application

Add your answer

Q100. iframes logic in selenium

Ans.

iframes logic in Selenium involves switching between frames to interact with elements inside them.

  • Use driver.switchTo().frame() method to switch to a frame by index, name, or WebElement

  • Use driver.switchTo().defaultContent() to switch back to the main content

  • Elements inside iframes can be located using regular Selenium locators

Add your answer
1
2

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

Interview Process at null

based on 136 interviews in the last 1 year
3 Interview rounds
Technical Round 1
Technical Round 2
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Associate Interview Questions from Similar Companies

3.7
 • 20 Interview Questions
3.9
 • 12 Interview Questions
3.8
 • 11 Interview Questions
3.3
 • 11 Interview Questions
4.0
 • 10 Interview Questions
3.5
 • 10 Interview Questions
View all
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