Happiest Minds Technologies
50+ TCS Interview Questions and Answers
You have given a Singly Linked List of integers, determine if it forms a cycle or not.
A cycle occurs when a node's next points back to a previous node in the list. The li...read more
Q2. 5. What are scope of beans? 6. Functional interfaces and examples 7. Can we make a class as private? 8. SQL query to find employees of particular department table. 9. Cascading 10. MapBy in hibernate 11. What i...
read moreJava Developer interview questions on beans, functional interfaces, SQL queries, hibernate, and more.
Scope of beans refers to the visibility of a bean within an application context.
Functional interfaces have only one abstract method and can be used as lambda expressions.
Classes cannot be private, but their constructors can be.
SQL query to find employees of a particular department table: SELECT * FROM employees WHERE department = 'department_name'
Cascading in Hibernate refers ...read more
Q3. how many columns can be created in table?
The number of columns that can be created in a table depends on the database management system being used.
The limit varies depending on the DBMS
For MySQL, the limit is 4096 columns per table
For Oracle, the limit is 1000 columns per table
The number of columns can also be limited by the available memory and disk space
Q4. 1. Write a program to sort the characters of a string in descending order? 2. Write a lambda expression of addition? 3. How to write custom exceptions? 4. What is indexing?
This program sorts the characters of a string in descending order.
Convert the string to a character array
Sort the character array in descending order
Convert the sorted character array back to a string
What is the difference between paging and segmentation?
Q6. How will you increase performance of a server to accept a million connections per aec
To increase server performance for a million connections per sec, we can optimize hardware, use load balancing, and implement caching.
Optimize hardware by upgrading RAM, CPU, and network interface cards
Use load balancing to distribute traffic across multiple servers
Implement caching to reduce server load and improve response time
Use a content delivery network (CDN) to serve static content
Use compression to reduce the size of data transmitted over the network
Q7. Types of Design Patterns and explain any one
Design patterns are reusable solutions to common software problems. One example is the Singleton pattern.
Creational patterns: Singleton, Factory, Abstract Factory, Builder
Structural patterns: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
Behavioral patterns: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor
Singleton pattern ensures a class has only one instance, and provides a globa...read more
Q8. What is oops describe with real time example?
OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of objects, which can contain data and code.
OOPs focuses on creating objects that interact with each other to solve a problem
Encapsulation: Objects encapsulate data and behavior. Example: Car object with properties like color and methods like start()
Inheritance: Objects can inherit attributes and methods from other objects. Example: Animal class with Dog and Cat subclasses
Polymorphism: Objects c...read more
What do you mean by FCFS?
Q10. Describe about data structures with real time examples?
Data structures are ways to organize and store data efficiently in a computer.
Data structures are used to store and organize data in a way that makes it easy to access and manipulate.
Examples of data structures include arrays, linked lists, stacks, queues, trees, and graphs.
For example, an array is a data structure that stores a collection of elements in a contiguous block of memory.
A linked list is a data structure where each element points to the next element in the list.
A ...read more
Difference between DELETE, DROP and TRUNCATE
Q12. Explain in details about Oops concepts
OOPs concepts are the fundamental principles of object-oriented programming.
Encapsulation - binding data and functions together
Inheritance - creating new classes from existing ones
Polymorphism - ability of objects to take on multiple forms
Abstraction - hiding implementation details from users
Q13. 1.The o/p should TTHHEE 2.find largest smallest element from the list 3.which oops concept use in python 4.difference between find_element and find-elements 5.how achive negative indexing in python 6.list compr...
read moreThe question is about a tester interview and includes various topics such as output manipulation, finding largest and smallest elements, OOPs concepts in Python, difference between find_element and find_elements, negative indexing in Python, and list comprehension.
1. The desired output is 'TTHHEE'.
2. Find the largest and smallest elements from a given list.
3. Discuss the OOPs concepts used in Python.
4. Explain the difference between find_element and find_elements.
5. Explain h...read more
Q14. What are the microservice design patterns available
Microservice design patterns are architectural patterns that help in designing and implementing microservices.
Service Decomposition
API Gateway
Service Registry
Circuit Breaker
Saga Pattern
Difference between Normalization and Denormalization
Q16. How do you determine size of routing table
The size of routing table is determined by the number of network prefixes and the number of routes.
The size of routing table is directly proportional to the number of network prefixes and the number of routes.
The size of routing table can be estimated by analyzing the number of unique IP addresses and the number of routing protocols used.
The size of routing table can be reduced by summarizing routes and using route aggregation.
The size of routing table can also be affected by...read more
Q17. Which is master database
Master database is the primary database that stores all the important data of an organization.
Master database is the central repository of all the important data of an organization
It is used to store and manage critical data such as customer information, financial data, and employee records
It is usually the most secure and highly available database in an organization
Examples of master databases include Oracle, SQL Server, and MySQL
Q18. Role of java in backend, explain polymorphism in oops, reverse string.
Java is a popular backend language, polymorphism allows objects to be treated as instances of their parent class, reverse string by iterating through characters.
Java is commonly used in backend development for its robustness and scalability.
Polymorphism in OOP allows objects to be treated as instances of their parent class, enabling flexibility and reusability.
To reverse a string, iterate through the characters from the end to the beginning and append them to a new string.
Q19. what are the data types in JS
Data types in JavaScript include number, string, boolean, object, function, undefined, and null.
Number - represents numeric data, e.g. 10, 3.14
String - represents textual data, e.g. 'hello', '123'
Boolean - represents true or false values, e.g. true, false
Object - represents complex data structures, e.g. { key: 'value' }
Function - represents executable code, e.g. function() { }
Undefined - represents a variable that has not been assigned a value
Null - represents an intentional ...read more
Q20. write a shell skript with arguments included
A shell script with arguments included
Start with a shebang line to specify the shell interpreter
Define variables to store the arguments passed to the script
Use conditional statements to handle different scenarios based on the arguments
Use loops to iterate over multiple arguments
Add comments to explain the purpose of the script and each section
Q21. SCCM Background of old environment.
The old environment had a background in SCCM.
The old environment utilized SCCM for software deployment and updates.
SCCM was also used for inventory management and reporting.
The SCCM infrastructure was configured with multiple distribution points for efficient content delivery.
The old environment may have had custom scripts or packages created for specific software deployments.
SCCM was likely integrated with Active Directory for user and device management.
Q22. Python class design for selenium test class
Python class design for Selenium test class involves creating a class with methods to interact with web elements and perform test actions.
Create a class for the test case with setup and teardown methods
Use instance variables to store web element locators
Implement test methods to perform actions like clicking, entering text, verifying text, etc.
Use Selenium WebDriver to interact with the browser and web elements
Q23. What do you know about Artificial Intelligence?
Artificial Intelligence (AI) is the simulation of human intelligence processes by machines, especially computer systems.
AI involves the development of algorithms that can perform tasks that typically require human intelligence, such as visual perception, speech recognition, decision-making, and language translation.
Machine learning is a subset of AI that focuses on the development of algorithms that allow computers to learn from and make predictions or decisions based on data...read more
Q24. Patching process of old env.
Patching old env involves identifying vulnerabilities, prioritizing patches, testing, and deploying.
Identify vulnerabilities in the old environment
Prioritize patches based on severity and impact
Test patches in a non-production environment before deploying
Deploy patches during scheduled maintenance windows
Monitor the environment for any issues post-patching
Q25. MQTT test framework design from scratch
Designing an MQTT test framework from scratch
Understand the requirements for testing MQTT protocol
Choose a programming language for implementation
Design test cases for different scenarios
Implement message publishing and subscribing functionalities
Include error handling mechanisms
Consider scalability and performance testing
Q26. Write a program to group 0's, 1's, and 2's.
Program to group 0's, 1's, and 2's in an array of strings.
Iterate through the array and count the occurrences of 0's, 1's, and 2's.
Create a new array of strings with the grouped numbers in the desired order.
Example: Input array ['1', '0', '2', '1', '0'], Output array ['0', '0', '1', '1', '2']
Q27. in infra understanding for an org
Understanding infrastructure for an organization is crucial for a Project Manager to ensure successful project delivery.
Infrastructure refers to the physical components and systems necessary for an organization to operate efficiently.
Project Managers need to understand the existing infrastructure of an organization to plan and execute projects effectively.
Examples of infrastructure include hardware, software, networks, data centers, and communication systems.
Infrastructure un...read more
Q28. type of projects handeled with budget
I have experience handling various types of projects with budgets ranging from small to large.
Managed IT projects with budgets ranging from $10,000 to $1,000,000
Led construction projects with budgets exceeding $5,000,000
Handled marketing campaigns with budgets as low as $1,000
Q29. Scripting any one language
Python is a versatile scripting language used for automation, web development, data analysis, and more.
Python is easy to learn and read, making it a popular choice for scripting.
It has a large standard library with built-in modules for various tasks.
Python supports multiple programming paradigms, including procedural, object-oriented, and functional programming.
It offers extensive third-party libraries like Selenium, PyTest, and requests for testing purposes.
Python's syntax e...read more
Q30. what are closures
Closures are functions that have access to variables from their containing scope even after the scope has closed.
Closures allow functions to access variables from their outer function even after the outer function has finished executing.
They are commonly used in event handlers, callbacks, and asynchronous programming.
Closures help in maintaining state in functional programming.
Q31. what is virtual DOM
Virtual DOM is a lightweight copy of the actual DOM used for efficient updates in web development.
Virtual DOM is a concept used in frameworks like React to improve performance by minimizing actual DOM manipulations.
When changes are made to the virtual DOM, a comparison is done with the actual DOM to determine the minimal updates needed.
This approach reduces the number of costly DOM operations, resulting in faster rendering and improved user experience.
Q32. When you consider a signal as high speed
A signal is considered high speed when it has a fast data transfer rate.
High-speed signals typically have data transfer rates above a certain threshold, such as 1 Gbps.
These signals require careful design considerations to minimize signal degradation and ensure reliable transmission.
Examples of high-speed signals include USB 3.0, HDMI, PCIe, and DDR4 memory interfaces.
Q33. Identical datasets with total number of output on different joins
Q34. Draw and explain current project architecture.
The current project architecture is a microservices-based system with a containerized deployment using Kubernetes.
Microservices architecture allows for modular and scalable development.
Containerization with Kubernetes enables efficient deployment and management of services.
Use of service mesh for communication between microservices.
Integration of monitoring and logging tools for observability.
Implementation of CI/CD pipelines for automated testing and deployment.
Q35. What is Threading
Threading is a programming technique that allows multiple tasks to run concurrently within a single process.
Threading allows for parallel execution of tasks within a program.
Threads share the same memory space, allowing for efficient communication between tasks.
Examples of threading include creating separate threads for handling user input and updating the UI in a GUI application.
Q36. certifications if any and when
PMP certification obtained in 2018
Obtained PMP certification in 2018
Continuously pursuing professional development through relevant certifications
Certifications demonstrate commitment to project management excellence
Q37. How to read data from excel
To read data from Excel, we can use libraries like Apache POI or Openpyxl.
Use Apache POI library in Java to read Excel files
Use Openpyxl library in Python to read Excel files
Identify the Excel file path and create a FileInputStream object
Create an instance of Workbook class and load the Excel file
Access the desired sheet and iterate through rows and columns to read data
Q38. write react code for counter
React code for a simple counter
Create a functional component for the counter
Use useState hook to manage the count state
Render the count value and buttons to increment and decrement the count
Q39. Reverse a string, Max number
Reverse a string and find the maximum number in the string.
Iterate through the string in reverse order to reverse it.
Use a variable to keep track of the maximum number found while iterating through the string.
Convert each character to a number and check if it is greater than the current maximum number.
Q40. What is callback hell
Callback hell is a situation in asynchronous programming where multiple nested callbacks make the code difficult to read and maintain.
Occurs when multiple asynchronous operations are nested within each other
Leads to deeply nested code structure which is hard to understand and maintain
Can be avoided by using promises, async/await, or libraries like async.js
Q41. Define Opps concept
OOPs concept stands for Object-Oriented Programming concepts which include principles like inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary f...read more
Q42. types of project handeled
I have handled various types of projects including construction, software development, event planning, and marketing campaigns.
Construction projects
Software development projects
Event planning projects
Marketing campaign projects
Q43. explain the challenge With API Clients
API clients can pose challenges due to varying levels of technical expertise and understanding of the API.
Different API clients may have different levels of technical expertise, leading to misunderstandings or misinterpretations of the API documentation.
API clients may not fully understand the capabilities and limitations of the API, resulting in inefficient or incorrect usage.
Managing multiple API clients can be complex, especially when updates or changes to the API are made...read more
Q44. Tools used by the Business Analyst
Business analysts use various tools to analyze data and communicate with stakeholders.
Microsoft Excel for data analysis and reporting
Jira for project management and tracking
Lucidchart for creating process flow diagrams
Tableau for data visualization
Confluence for documentation and collaboration
Q45. Difference between data lake and mesh?
Data lake is a centralized repository for storing structured and unstructured data, while mesh is a network of interconnected services.
Data lake stores raw data in its native format, while mesh connects various services and applications.
Data lake is used for data storage and analytics, while mesh is used for communication and integration.
Examples of data lake technologies include Amazon S3 and Hadoop, while examples of mesh technologies include Istio and Linkerd.
Q46. SQL Query for data selection from table
Q47. What is event loop
Event loop is a mechanism in programming that allows for asynchronous execution of code by managing the order of operations.
Event loop is commonly used in JavaScript to handle asynchronous operations.
It allows for non-blocking I/O operations by continuously checking the event queue for tasks to execute.
Event loop ensures that tasks are executed in the order they were added to the queue.
Example: setTimeout() function in JavaScript uses event loop to schedule a function to run ...read more
Q48. Create a list of duplicates in array
Function to find duplicates in an array of integers and return a list of unique duplicates.
Iterate through the array and keep track of elements seen before using a hash set.
If an element is already in the hash set, add it to the result list.
Return the list of unique duplicates found.
Q49. Aws services used in the project
The project utilized various AWS services for data storage, processing, and analysis.
S3 for data storage
EC2 for computing resources
Glue for ETL processes
Sagemaker for machine learning models
Athena for querying data in S3
Q50. Sort given string array
Sort a given string array in alphabetical order
Use a sorting algorithm like quicksort or mergesort
Consider using built-in sorting functions in programming languages
Ensure the sorting is case-sensitive unless specified otherwise
Q51. Different type of joins and definition
Q52. check whether string is palindrome
Check if a string is a palindrome
Iterate through the string from both ends and compare characters
Ignore spaces and punctuation while checking for palindrome
Convert string to lowercase for case-insensitive comparison
Q53. Explain about Framework
A framework is a set of guidelines, libraries, and tools that help in developing and organizing code for software testing.
Framework provides a structure for test automation
It includes reusable components, libraries, and utilities
Frameworks can be data-driven, keyword-driven, or hybrid
Examples: Selenium WebDriver for web testing, Appium for mobile testing
Q54. Describe Ospf states
OSPF states are the different stages a router goes through while establishing and maintaining a neighbor relationship.
OSPF states include Down, Init, 2-Way, Exstart, Exchange, Loading, and Full
In the Down state, the router has not yet established a neighbor relationship
In the Init state, the router has sent a Hello packet but has not received a response
In the 2-Way state, the router has received a Hello packet from a neighbor
In the Exstart state, the routers exchange their in...read more
Q55. Core functionalities of vuejs
Vue.js is a progressive JavaScript framework for building user interfaces.
Reactive data binding
Component-based architecture
Virtual DOM
Directives
Computed properties
Event handling
Routing
Vuex state management
Server-side rendering
Q56. Project worked on
Developed a real-time data processing system for analyzing customer behavior
Designed and implemented data pipelines using Apache Kafka and Spark
Optimized data processing algorithms to handle large volumes of streaming data
Collaborated with data scientists to integrate machine learning models into the system
Q57. Explain KPI's of retail
KPI's in retail are key performance indicators used to measure the success of a retail business.
Sales revenue
Customer satisfaction
Inventory turnover rate
Average transaction value
Conversion rate
Gross margin
Foot traffic
Return on investment (ROI)
Q58. Api automation concept
API automation is the process of using software to execute pre-scripted tests on APIs to ensure they function correctly.
API automation involves writing scripts to interact with APIs and validate their responses
It helps in automating the testing of API endpoints for functionality, reliability, and performance
Tools like Postman, SoapUI, and RestAssured are commonly used for API automation
API automation can be used for regression testing, load testing, and integration testing of...read more
Q59. Reverse a array
Reverse an array of integers in place
Create two pointers, one at the start and one at the end of the array
Swap the elements at the two pointers and move them towards the center until they meet
Time complexity: O(n), Space complexity: O(1)
Top HR Questions asked in TCS
Interview Process at TCS
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month