TCS
10+ LLadro Interview Questions and Answers
Q1. Given a maximum of 100 digit numbers as input, find the difference between the sum of odd and even position digits
The program calculates the difference between the sum of odd and even position digits in a given number.
Iterate through each digit of the number
Keep track of the sum of digits at odd positions and even positions separately
Calculate the difference between the two sums
Q2. Write a program to generate a hash function using my sql
Generate a hash function using MySQL
Use the MySQL built-in function SHA2() to generate a hash value
Specify the input string and the desired hash length as parameters
Example: SELECT SHA2('hello', 256) AS hash_value;
Q3. Write a code to print the multiplication table
Code to print the multiplication table
Use nested loops to iterate through rows and columns
Print the product of row and column for each cell
Consider formatting the output for better readability
Q4. Sql code update first letter to upper case
Use SQL UPDATE statement with CONCAT and UPPER functions to update first letter to upper case.
Use UPDATE statement to modify the data in the table
Use CONCAT function to combine the UPPER function with the rest of the string
Use UPPER function to convert the first letter to upper case
Q5. Check if a number is a palidrome or not.
A palindrome number is the same when read forwards and backwards.
Convert the number to a string to easily check for palindrome
Reverse the string and compare it with the original string
If they are the same, the number is a palindrome
Q6. What is cloud computing?
Cloud computing is the delivery of computing services over the internet, including storage, servers, databases, networking, software, and more.
Cloud computing allows users to access and use resources on-demand without the need for physical infrastructure.
Examples of cloud computing services include Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform.
Cloud computing offers scalability, flexibility, cost-effectiveness, and increased efficiency for businesses a...read more
Q7. Why did you choose TCS?
I chose TCS for its global presence, diverse opportunities, and strong reputation in the IT industry.
Global presence with offices in multiple countries
Diverse opportunities for career growth and development
Strong reputation in the IT industry for quality services
Positive reviews from current and former employees
Q8. What you know about tcs
TCS is a multinational IT services and consulting company headquartered in India.
TCS stands for Tata Consultancy Services
It is one of the largest IT services companies in the world
TCS offers services in areas such as consulting, software development, and business process outsourcing
Q9. Form code with password encryption
Use hashing algorithms like bcrypt to securely encrypt passwords in code.
Use a secure hashing algorithm like bcrypt to encrypt passwords in code.
Never store passwords in plain text.
Salt the passwords before hashing for added security.
Implement proper password storage and validation techniques.
Example: bcrypt.hashSync('password', 10)
Q10. What is mutable and immutable
Mutable and immutable refer to the ability to change or not change an object's state.
Mutable objects can be modified after creation, while immutable objects cannot be changed.
Examples of mutable objects include lists and dictionaries in Python.
Examples of immutable objects include strings and tuples in Python.
Q11. largest sum of the sub array
Find the largest sum of a subarray within an array of strings.
Iterate through the array and keep track of the sum of each subarray.
Update the maximum sum as you go through the array.
Return the largest sum found.
Q12. Scope of beans in spring boot
Beans in Spring Boot provide a way to manage and configure application components.
Beans are managed by the Spring IoC container
They are created and initialized by the container
Beans can be defined using annotations or XML configuration
They can be scoped as singleton, prototype, request, session, etc.
Beans can be autowired to inject dependencies
Example: @Component annotation creates a bean
Example: @Autowired annotation injects a bean
Q13. What is spring boot
Spring Boot is a framework that simplifies the development of Java applications by providing a pre-configured environment.
Spring Boot is built on top of the Spring framework and follows the convention over configuration principle.
It allows developers to create stand-alone, production-grade Spring-based applications with minimal configuration.
Spring Boot provides a wide range of features like auto-configuration, embedded servers, and dependency management.
It promotes the use o...read more
Q14. write code for bubble sort
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
Start by comparing the first two elements of the array and swap them if necessary.
Continue comparing adjacent elements and swapping them until the array is sorted.
Repeat this process for each element in the array until no more swaps are needed.
Q15. Function overloading example
Function overloading allows multiple functions with the same name but different parameters.
Function overloading is a feature in many programming languages that allows multiple functions with the same name but different parameters.
Example: int add(int a, int b) and float add(float a, float b) are two overloaded functions with the same name 'add' but different parameter types.
Example: void print(int num) and void print(string text) are two overloaded functions with the same nam...read more
More about working at TCS
Interview Process at LLadro
Reviews
Interviews
Salaries
Users/Month