Odessa
20+ TCS Interview Questions and Answers
Q1. Real time examples using oops concept
Real-time examples of OOP concepts include inheritance in vehicle classes, encapsulation in banking systems, and polymorphism in shape classes.
Inheritance: Car and Bike classes inheriting from Vehicle class
Encapsulation: BankAccount class with private variables and public methods
Polymorphism: Circle and Square classes both inheriting from Shape class
Q2. Best sorting algorithm and why and explain the logic
The best sorting algorithm is QuickSort due to its average case time complexity of O(nlogn) and low memory usage.
QuickSort is a divide and conquer algorithm that recursively partitions the array into smaller subarrays and sorts them.
It has an average case time complexity of O(nlogn) and a worst case time complexity of O(n^2).
QuickSort has low memory usage as it sorts the array in place, without requiring additional memory.
It is widely used in practice due to its efficiency an...read more
Q3. Find the middle of a linked list
To find the middle of a linked list, use the slow and fast pointer technique.
Initialize two pointers, slow and fast, both pointing to the head of the linked list.
Move the slow pointer by one step and the fast pointer by two steps until the fast pointer reaches the end of the list.
The position of the slow pointer will be the middle of the linked list.
Q4. Detect loop in a Linked list
Use Floyd's Cycle Detection Algorithm to detect loop in a Linked list.
Initialize two pointers, slow and fast, at the head of the linked list.
Move slow pointer by one step and fast pointer by two steps.
If they meet at any point, there is a loop in the linked list.
Q5. As a product manager for g pay how would you test it
To test g pay as a product manager, I would conduct usability testing, security testing, performance testing, and compatibility testing.
Conduct usability testing to ensure the app is user-friendly and intuitive.
Perform security testing to identify and fix any vulnerabilities in the payment system.
Conduct performance testing to ensure the app can handle a high volume of transactions without crashing.
Test compatibility with different devices, operating systems, and browsers to ...read more
Q6. Difference between Direct Finance Lease and Operating Lease.
Direct finance lease is a type of lease where the lessee takes ownership of the asset at the end of the lease term, while operating lease is a type of lease where the lessor retains ownership of the asset.
Direct finance lease is also known as capital lease.
In direct finance lease, the lessee is responsible for maintenance and insurance of the asset.
Operating lease is also known as service lease.
In operating lease, the lessor is responsible for maintenance and insurance of the...read more
Q7. What is difference between operating lease and sales lease
Operating lease is a short-term lease where the lessor retains ownership of the asset, while a sales lease is a long-term lease where the lessee has the option to purchase the asset at the end of the lease term.
Operating lease is typically short-term, while sales lease is long-term.
In operating lease, the lessor retains ownership of the asset, while in sales lease, the lessee has the option to purchase the asset at the end of the lease term.
Operating lease is more like rentin...read more
Q8. Real life example of stack and queue
Stack and queue are data structures used to store and retrieve data in a specific order.
Stack: undo/redo functionality in text editors, back button in web browsers
Queue: printing jobs in a printer, waiting list for a ride at an amusement park
Q9. Practical Steps involved in designing API?
Designing API involves defining endpoints, data formats, authentication, and documentation.
Identify the purpose and functionality of the API
Define the endpoints and methods (GET, POST, PUT, DELETE)
Choose data formats (JSON, XML) and parameters
Implement authentication and authorization mechanisms
Document the API including usage examples and error codes
Q10. Can you explain your C program of Programming test?
The C program for the Programming test involves solving a specific problem using the C programming language.
The program likely includes functions, loops, and conditional statements to solve the problem.
It may involve working with arrays, strings, or other data structures.
Error handling and input validation are important aspects of the program.
Example: Implementing a sorting algorithm in C to sort an array of integers.
Q11. Explain the Authentication process?
Authentication process is the verification of a user's identity before granting access to a system.
User provides credentials (username, password, etc.)
Credentials are verified by the system
If credentials are valid, user is granted access
Common authentication methods include username/password, biometrics, tokens, etc.
Q12. Different types of leases
Different types of leases include operating leases, finance leases, and sales and leaseback arrangements.
Operating leases are short-term leases where the lessor retains ownership of the asset.
Finance leases are long-term leases where the lessee assumes most of the risks and rewards of ownership.
Sales and leaseback arrangements involve selling an asset to a lessor and then leasing it back.
Other types of leases include direct financing leases, leveraged leases, and synthetic le...read more
Q13. What is rank function?
Rank function is used to assign a rank to each row within a result set based on specified criteria.
Rank function is commonly used in SQL queries to order and rank data.
It assigns a unique rank to each row based on the specified criteria.
The rank of a row is determined by its position in the ordered result set.
If two rows have the same values, they will be assigned the same rank.
The next rank will be skipped if there are ties.
Rank function is often used in scenarios like leade...read more
Q14. Crack a joke, you may use Hindi if you want
Sure, here's a Hindi joke: एक बार एक चिड़िया ने कहा, 'मुझे तो आज भी यकीन नहीं हो रहा कि मैं एक चिड़िया हूँ!'
Why did the tomato turn red? Because it saw the salad dressing!
What did one wall say to the other wall? I'll meet you at the corner!
Why couldn't the bicycle stand up by itself? Because it was two tired!
Q15. What is dependency Injection?
Dependency Injection is a design pattern that allows objects to receive dependencies rather than creating them internally.
Dependency Injection is a way to achieve loose coupling between objects.
It allows for easier testing and maintenance of code.
There are three types of Dependency Injection: Constructor Injection, Setter Injection, and Interface Injection.
Example: Instead of creating a database connection object inside a class, the object is passed as a parameter to the clas...read more
Q16. Design True Caller Application
True Caller is a caller identification app that helps users identify unknown callers and block spam calls.
Develop a database to store phone numbers and associated user information
Implement a search feature to look up phone numbers and display caller information
Integrate with telecom providers to access real-time call data
Implement a spam detection algorithm to identify and block spam calls
Allow users to report and block unwanted callers
Ensure data privacy and security measure...read more
Q17. What is Object?
An object is a data structure that contains properties and methods.
An object is an instance of a class or a data structure that encapsulates data and behavior.
Objects have properties, which are variables that hold values, and methods, which are functions that perform actions.
Objects can be created using classes or object literals.
Example: In JavaScript, an object can be created using the object literal syntax: { name: 'John', age: 25 }
Q18. What is OOP?
OOP stands for Object-Oriented Programming, a programming paradigm based on the concept of objects.
OOP focuses on creating objects that contain data and methods to manipulate that data.
Encapsulation, inheritance, and polymorphism are key principles of OOP.
Examples of OOP languages include Java, C++, and Python.
Q19. Tell me about 8085
The 8085 is a microprocessor introduced by Intel in 1976.
It is an 8-bit microprocessor.
It has a 16-bit address bus and can address up to 64 KB of memory.
It operates at a clock speed of 3 MHz.
It has a total of 74 instructions.
It is widely used in embedded systems and educational purposes.
Q20. Design ATM System
Designing an ATM system
Identify the main components of the ATM system: ATM machine, bank server, network
Define the functionalities of the ATM system: cash withdrawal, balance inquiry, fund transfer, etc.
Consider security measures such as PIN verification, card authentication, and encryption
Design the user interface for easy navigation and accessibility
Ensure reliability and availability of the system by implementing backup and recovery mechanisms
Integrate with banking systems...read more
Q21. Find words in string
Finding words in a string using array of strings
Split the string into words using a delimiter like space
Iterate through the words to find the desired words
Store the found words in an array of strings
Q22. Try another joke
The interviewer asked for another joke.
Apologize for not being a comedian
Politely decline to tell another joke
Redirect the conversation back to the interview topic
Top HR Questions asked in TCS
Interview Process at TCS
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month