Wipro
Tata Elxsi Interview Questions and Answers
Q1. Print the true or false by checking the input is ordered or not input is {[()]} 2nd input is ({[)}]
The input is checked for order and the result is printed as true or false.
Check if the input is ordered by comparing opening and closing brackets
Use a stack to keep track of opening brackets
If a closing bracket is encountered, pop the top element from the stack and check if it matches the closing bracket
If the stack is empty at the end, the input is ordered
Q2. Print reverse of string by using for loop
The code snippet prints the reverse of a given string using a for loop.
Initialize an empty string to store the reversed string.
Iterate through each character in the original string using a for loop.
Append each character to the beginning of the reversed string.
Print the reversed string.
Q3. What is web application testing
Web application testing is the process of evaluating the functionality, usability, and security of a web application.
It involves testing the application's features, such as forms, navigation, and user interactions.
It also includes checking for compatibility across different browsers and devices.
Security testing is crucial to identify vulnerabilities and protect against attacks.
Performance testing ensures the application can handle expected user load.
Examples: testing an e-com...read more
Q4. What is dict in python
A dict in Python is an unordered collection of key-value pairs.
Dicts are enclosed in curly braces {}
Each key-value pair is separated by a colon :
Keys must be unique and immutable (strings, numbers, or tuples)
Values can be of any type and can be duplicated
Dicts are mutable and can be modified by adding, updating, or deleting key-value pairs
Q5. What is decorator
A decorator is a design pattern in Python that allows a user to add new functionality to an existing object or function.
Decorators are denoted by the @ symbol followed by the name of the decorator function.
They are used to modify the behavior of the decorated object or function without directly changing its source code.
Decorators can be used for adding logging, timing, caching, authentication, and other cross-cutting concerns to functions or classes.
They can be applied to fun...read more
Q6. What is dunder method
Dunder method refers to special methods in Python that start and end with double underscores (__).
Dunder methods are also known as magic methods or special methods.
They are used to define behavior for built-in operations in Python, such as addition, subtraction, comparison, etc.
Examples of dunder methods include __init__ for object initialization, __add__ for addition, __str__ for string representation, etc.
Q7. Diff between list and tuple
Lists and tuples are both sequence data types in Python, but they have some key differences.
Lists are mutable, meaning their elements can be changed, added, or removed.
Tuples are immutable, meaning their elements cannot be changed once defined.
Lists use square brackets [], while tuples use parentheses ().
Lists are typically used for collections of similar items, while tuples are used for heterogeneous data.
Lists have more built-in methods and are generally more flexible than ...read more
Q8. Print random ip address
Generate and print a random IP address.
Use the random module to generate random numbers for each octet of the IP address.
Ensure that the generated IP address is valid by checking that each octet is within the range of 0-255.
Join the octets together with periods to form the complete IP address.
Print the generated IP address.
Q9. Inheritance in oops
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Inheritance allows code reuse and promotes modularity.
The class that is being inherited from is called the parent class or base class.
The class that inherits from the parent class is called the child class or derived class.
The child class can access all the public and protected members of the parent class.
In Python, inheritance is implemented using the 'c...read more
Interview Process at Tata Elxsi
Reviews
Interviews
Salaries
Users/Month