Mphasis
70+ Carrier Interview Questions and Answers
Q1. Why Mphasis? What do you know about us?
Mphasis is a leading IT solutions provider with a focus on digital transformation.
Mphasis has a strong presence in the banking and financial services industry, providing innovative solutions to clients such as Citibank and Standard Chartered.
The company has a focus on digital transformation and offers services such as cloud computing, data analytics, and artificial intelligence.
Mphasis has won several awards for its work in the IT industry, including the NASSCOM Customer Serv...read more
Q2. Write a program for multiple inheritances?
A program for multiple inheritances
Create a base class with common attributes and methods
Create derived classes that inherit from the base class
Use multiple inheritance to inherit from multiple base classes
Resolve any naming conflicts using scope resolution operator (::)
Example: class Derived: public Base1, public Base2 {}
Example: class Derived: public Base1, public Base2 { public: void method() { Base1::method(); Base2::method(); } }
Q3. What is the difference between structure and union?
Structure is a collection of variables of different data types while union is a collection of variables of same data type.
Structure allocates memory for all its variables while union allocates memory for only one variable at a time.
Structure is used when we need to store different types of data while union is used when we need to store only one type of data.
Example of structure: struct student { char name[20]; int age; float marks; };
Example of union: union data { int i; floa...read more
Q4. What is your definition of work-life balance?
Work-life balance is the ability to prioritize and manage both work and personal life effectively.
It involves setting boundaries and managing time efficiently
It allows for time to pursue personal interests and hobbies
It reduces stress and burnout
Examples include flexible work hours, remote work options, and time off for personal reasons
Q5. C code to perform in-order traversal on a binary tree.
C code for in-order traversal on a binary tree.
Start at the root node.
Traverse the left subtree recursively.
Visit the root node.
Traverse the right subtree recursively.
Repeat until all nodes have been visited.
Example code: void inorderTraversal(Node* root) { if(root != NULL) { inorderTraversal(root->left); printf("%d ", root->data); inorderTraversal(root->right); } }
Q6. Difference between Function overriding and function overloading?
Function overriding vs function overloading
Function overloading is having multiple functions with the same name but different parameters
Function overriding is having a function in a subclass with the same name and parameters as a function in the superclass
Function overloading is resolved at compile-time while function overriding is resolved at runtime
Q7. What do you know about process management?
Process management involves planning, organizing, executing, and monitoring processes to achieve organizational goals.
It includes identifying and defining processes
Assigning responsibilities and resources
Establishing timelines and milestones
Monitoring progress and making adjustments as needed
Examples include project management, supply chain management, and quality management
Q8. What is a dangling pointer?
A dangling pointer is a pointer that points to a memory location that has been deallocated or freed.
Dangling pointers can cause crashes or unexpected behavior when accessed.
They can occur when a pointer is not set to NULL after the memory it points to is freed.
Example: int *ptr = malloc(sizeof(int)); free(ptr); printf('%d', *ptr);
In the above example, ptr becomes a dangling pointer after the memory it points to is freed.
Q9. What is inheritance and type of inheritance
Inheritance is a mechanism in OOP where a new class is derived from an existing class.
It allows the new class to inherit the properties and methods of the existing class.
The existing class is called the parent or base class, and the new class is called the child or derived class.
There are different types of inheritance: single, multiple, multilevel, and hierarchical.
Example: A car class can be a parent class, and a sedan class can be a child class that inherits the properties...read more
Q10. Explain about OSI model
The OSI model is a conceptual model that describes how data is transmitted over a network.
OSI stands for Open Systems Interconnection.
It has 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Each layer has a specific function and communicates with the adjacent layers.
Example: When you send an email, the Application layer sends it to the Presentation layer, which formats the data, and then sends it to the Session layer.
The Session layer ...read more
Q11. Code for sum of n natural numbers
Code for sum of n natural numbers
Use a loop to iterate from 1 to n and add each number to a sum variable
Return the sum variable
Q12. How to handle customized exceptions in controller advice with example code.
Handling customized exceptions in controller advice with example code
Create a custom exception class that extends RuntimeException
Create a controller advice class to handle exceptions globally
Use @ExceptionHandler annotation in the controller advice class to handle specific exceptions
Return a custom error response with appropriate status code and message
Q13. oops concepts with real time examples
Object-oriented programming concepts with real-life examples
Encapsulation: A car's engine is encapsulated and hidden from the user, who only interacts with the car's interface.
Inheritance: A cat is a subclass of the animal class, inheriting its properties and methods.
Polymorphism: A shape class can have different methods for calculating area depending on the shape, such as circle or rectangle.
Abstraction: A TV remote control abstracts the complex inner workings of the TV and ...read more
Q14. Company info. Diff between home and house.
The question is about company info and the difference between home and house.
Company info refers to details about the organization such as its history, mission, and values.
Home refers to a place where one lives and feels comfortable, while house refers to a physical structure.
A house can be a home, but not all homes are houses. For example, an apartment or a mobile home can also be a home.
The difference between home and house is subjective and can vary based on cultural and p...read more
Q15. What are lists and tupples
Lists and tuples are data structures in Python used to store collections of items.
Lists are mutable and ordered, allowing for easy addition and removal of elements.
Tuples are immutable and ordered, making them useful for storing related data that should not be changed.
Both can store any type of data, including other lists or tuples.
Lists are created using square brackets, while tuples use parentheses.
Example: my_list = [1, 'hello', [2, 3]]
Example: my_tuple = (4, 'world', (5, ...read more
Q16. Any program which you know.
One program I know is a simple calculator program written in Python.
The program takes user input for two numbers and an operator (+, -, *, /).
It then performs the operation and displays the result.
Example: input 5, +, 3 -> output 8
Q17. How to handle the exceptions globally in rest api Springboot
Handle exceptions globally in Springboot REST API
Use @ControllerAdvice annotation to define global exception handling for all controllers
Create a class annotated with @ControllerAdvice and define methods to handle specific exceptions
Use @ExceptionHandler annotation to specify which exceptions the method should handle
Return appropriate HTTP status codes and error messages in the exception handling methods
Q18. What annotations are included in @SpringbootApplication annotation
The @SpringBootApplication annotation includes @Configuration, @EnableAutoConfiguration, and @ComponentScan annotations.
Includes @Configuration annotation to specify that the class can be used by the Spring IoC container as a source of bean definitions.
Includes @EnableAutoConfiguration annotation to enable Spring Boot's auto-configuration feature.
Includes @ComponentScan annotation to specify the base packages to scan for components.
Q19. Diff between handwork and smartwork.
Handwork is hard work done manually, while smart work is efficient work done with the use of technology and strategy.
Handwork involves physical effort, while smart work involves mental effort.
Handwork is time-consuming, while smart work is time-efficient.
Handwork may not always yield the desired results, while smart work is focused on achieving specific goals.
Examples of handwork include farming, construction, and cleaning, while examples of smart work include automation, dat...read more
Q20. explain Object oriented program
Object-oriented programming is a programming paradigm based on the concept of objects, which can contain data and code.
Objects are instances of classes, which define the structure and behavior of the objects.
Encapsulation allows data to be hidden within objects and only accessed through methods.
Inheritance allows classes to inherit attributes and methods from other classes.
Polymorphism allows objects to be treated as instances of their parent class, enabling flexibility and r...read more
Q21. abt project and algorithms used
I worked on a project that involved developing a recommendation system using collaborative filtering algorithms.
Implemented collaborative filtering algorithms like user-based and item-based recommendation systems
Utilized cosine similarity and Pearson correlation coefficient for calculating similarity between users/items
Used matrix factorization techniques like Singular Value Decomposition (SVD) for recommendation
Evaluated the performance of algorithms using metrics like RMSE ...read more
Q22. 2 programming questions Find the 2nd greatest in 2 different ways
Find the 2nd greatest in 2 different ways
Sort the array and return the second largest element
Use a loop to find the largest element and then find the second largest element
Use a priority queue to find the second largest element
Q23. Projects in Engineering
Projects in engineering involve designing, building, and testing systems and structures to solve problems.
Identify problem and constraints
Design solution and create blueprints
Build and test prototype
Refine design based on testing results
Implement final solution
Examples: building a bridge, designing a new software application
Q24. pointers in c
Pointers in C are variables that store memory addresses. They are used to manipulate data and create dynamic data structures.
Pointers are declared using the * symbol, and can be initialized to the address of another variable.
Dereferencing a pointer means accessing the value stored at the memory address it points to, using the * symbol.
Pointers can be used to pass variables by reference, allowing functions to modify the original variable.
Dynamic memory allocation can be done u...read more
Q25. write code for duplicate array
Code to remove duplicates from an array of strings
Use a Set to store unique elements
Iterate through the array and add each element to the Set
Convert the Set back to an array to get the final result
Q26. okay with any location
I am open to any location for the job.
I am willing to relocate for the job
I am flexible with the location
I am excited about the opportunity to work in different places
Q27. Write the program to find smaller value from 3 input
Program to find the smallest value from 3 inputs.
Compare the first two inputs and store the smaller value.
Compare the stored value with the third input and update if smaller.
Return the final stored value as the smallest value.
Q28. constructors in java
Constructors are special methods used to initialize objects in Java.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
Constructors can be overloaded to accept different parameters.
Default constructor is provided by Java if no constructor is defined.
Constructors can also call other constructors using 'this' keyword.
Q29. Micro services design pattern and example
Microservices design pattern involves breaking down a large application into smaller, independent services.
Each microservice is responsible for a specific function or feature
Communication between microservices is typically done through APIs
Microservices can be deployed independently, allowing for easier scalability and maintenance
Examples include Netflix (uses microservices for different functionalities like recommendation, user management) and Amazon (uses microservices for ...read more
Q30. Smart works vs hardwork
Smart work is the key to success, but hard work is equally important.
Smart work involves using your resources efficiently to achieve your goals.
Hard work involves putting in a lot of effort and time to achieve your goals.
A combination of both smart work and hard work is ideal for success.
For example, a student who studies smartly by focusing on important topics and practicing previous year papers along with putting in hard work by studying for long hours is more likely to suc...read more
Q31. Map, flatmap method difference in stream
Map method transforms each element in a stream, while flatMap method transforms each element into a stream and then flattens the result.
Map method applies a function to each element in the stream and returns a new stream with the transformed elements.
FlatMap method applies a function that returns a stream for each element in the original stream, then flattens these streams into a single stream.
Example: Using map to convert a list of strings to uppercase - List
names = Arrays....read more
Q32. Linear and binary search algorithm
Linear search checks each element in a list sequentially, while binary search divides the list in half at each step.
Linear search has a time complexity of O(n), while binary search has a time complexity of O(log n).
Linear search is used for unsorted lists, while binary search is used for sorted lists.
Example: Linear search - searching for a name in a phone book. Binary search - searching for a word in a dictionary.
Q33. How to create the table
To create a table, use SQL CREATE TABLE statement with column names and data types.
Specify the table name after CREATE TABLE keyword
List column names and data types separated by commas inside parentheses
Add any constraints like PRIMARY KEY or FOREIGN KEY if needed
Example: CREATE TABLE customers (id INT PRIMARY KEY, name VARCHAR(50), email VARCHAR(100))
Q34. What is overloading?
Overloading is the ability to have multiple methods with the same name but different parameters.
Overloading allows for more flexibility in method naming and usage.
The methods must have different parameters, such as different data types or different numbers of parameters.
Example: public void print(int num) and public void print(String str) are both methods with the same name but different parameters.
Overloading is determined at compile time based on the method signature.
Q35. What is overriding
Overriding is a feature in object-oriented programming where a subclass provides its own implementation of a method that is already defined in its superclass.
Overriding allows a subclass to provide a specific implementation of a method that is already defined in its superclass.
The method signature (name, parameters, and return type) must be the same in both the superclass and subclass.
The subclass method must have the same or a more accessible access modifier than the supercl...read more
Q36. What is abstraction?
Abstraction is the process of hiding complex implementation details and exposing only the necessary information.
Abstraction is a way to manage complexity by breaking down a system into smaller, more manageable parts.
It allows us to focus on the essential features of a system while ignoring the non-essential details.
Abstraction can be achieved through the use of interfaces, abstract classes, and encapsulation.
For example, a car can be abstracted as a vehicle with certain prope...read more
Q37. Coding quastion using java 8
Implement a function to filter out strings starting with a specific letter using Java 8.
Use Java 8 Stream API to filter the strings based on a condition.
Use lambda expressions to define the filtering condition.
Use the 'filter' method of Stream to apply the filtering condition.
Q38. Superclass of java
Object class is the superclass of all classes in Java.
Object class provides basic functionalities like toString(), equals(), hashCode() etc.
All classes in Java directly or indirectly inherit from Object class.
Object class is located in java.lang package.
Example: String class extends Object class.
Q39. write the code in notepad by sharing your screen
Code writing task for Automation Test Engineer position
Open Notepad
Write code for the given task
Share screen to show the code
Ensure code is well-structured and follows best practices
Q40. How would you do things differently than the current QA?
I would focus on implementing automation testing and improving communication with development team.
Implement automation testing to increase efficiency and reduce manual errors
Improve communication with development team to ensure timely bug fixes
Create a comprehensive test plan to cover all possible scenarios
Regularly review and update testing processes to stay current with industry standards
Q41. explain your automation framework
My automation framework is a hybrid framework that uses both data-driven and keyword-driven approaches.
The framework is built using Selenium WebDriver and TestNG.
It uses Excel sheets to store test data and Apache POI library to read/write data from/to Excel.
The framework has a modular structure with reusable functions and libraries.
It uses Page Object Model design pattern to maintain object repository.
The framework generates detailed HTML reports using ExtentReports library.
I...read more
Q42. 7. Marker interfaces, Singleton design pattern, why string is immutable
Explaining marker interfaces, Singleton design pattern, and immutability of strings
Marker interfaces are interfaces with no methods, used to mark a class as having a certain behavior or capability
Singleton design pattern ensures only one instance of a class is created and provides a global point of access to it
Strings are immutable in Java to ensure their values cannot be changed once created, which improves security and performance
Immutable objects are thread-safe and can be...read more
Q43. What are the reports that a QA has to prepare?
QA prepares various reports to track and analyze quality metrics.
Test execution report
Defect report
Test summary report
Test coverage report
Test trend report
Q44. how many types of constructor are there? ---told
There are three types of constructors in Java: default, parameterized, and copy constructors.
Default constructor: no arguments passed
Parameterized constructor: arguments passed
Copy constructor: creates a new object as a copy of an existing object
Example: public class Person { public Person() {} public Person(String name) { this.name = name; } public Person(Person person) { this.name = person.name; } }
Q45. 2. Microservice architecture, benefits, and their disadvantages
Microservice architecture is a software design pattern where an application is divided into small, independent services.
Benefits of microservice architecture:
- Scalability: Each service can be scaled independently, allowing for better performance and resource utilization.
- Flexibility: Services can be developed, deployed, and updated independently, enabling faster development cycles.
- Fault isolation: If one service fails, it doesn't affect the entire application.
- Technology...read more
Q46. 1. Spring Boot vs Spring? Benefits and differences
Spring Boot is an opinionated framework that simplifies Spring development.
Spring Boot provides auto-configuration and embedded servers.
Spring Boot reduces boilerplate code and configuration.
Spring Boot is ideal for microservices and standalone applications.
Spring provides a more flexible and customizable framework.
Spring requires more configuration and setup.
Spring is ideal for large-scale enterprise applications.
Q47. What is diff b/w compiler and interpreter
Compiler translates entire code into machine code before execution, while interpreter translates code line by line during execution.
Compiler converts entire code into machine code before execution
Interpreter translates code line by line during execution
Compiler generates intermediate object code or executable file
Interpreter does not generate intermediate object code
Examples: C, C++ compilers vs Python, Ruby interpreters
Q48. 6. Changes in Java 8, new features, Stream API
Java 8 introduced new features like lambda expressions, functional interfaces, and Stream API.
Lambda expressions allow functional programming in Java.
Functional interfaces are interfaces with a single abstract method.
Stream API provides a functional way of processing collections.
Default methods allow adding new methods to interfaces without breaking existing implementations.
Date and Time API provides a more comprehensive way of handling date and time.
Nashorn JavaScript engine...read more
Q49. choose one, java or c? --- java
Java is a popular programming language known for its versatility and compatibility with various platforms.
Java is an object-oriented language
It is used for developing desktop, web, and mobile applications
Java Virtual Machine (JVM) enables cross-platform compatibility
Q50. can constructor be overridden? ---told
Yes, constructor can be overridden.
Constructor can be overridden in Java using method overloading.
The subclass constructor can call the superclass constructor using super() keyword.
Overriding constructor can be used to provide different ways of initializing an object.
Q51. What’s the difference between functional and object oriented programming
Functional programming focuses on functions and immutability, while object oriented programming focuses on objects and classes.
Functional programming uses pure functions that do not have side effects
Object oriented programming uses objects that encapsulate data and behavior
In functional programming, data is immutable and functions are first-class citizens
In object oriented programming, objects interact with each other through methods and inheritance
Example: Functional program...read more
Q52. what is a constructor? ---told
A constructor is a special method that is used to initialize objects in a class.
Constructors have the same name as the class they are in.
They are called automatically when an object is created.
They can take parameters to set initial values for object properties.
Example: public class Car { public Car(String make, String model) { this.make = make; this.model = model; } }
Example: Car myCar = new Car("Toyota", "Corolla");
Q53. What is VPN, How doss it work ?
VPN stands for Virtual Private Network, it allows users to securely access a private network over a public network.
VPN creates a secure and encrypted connection between the user's device and the private network
It masks the user's IP address and location, providing anonymity and privacy
VPN can be used to access geo-restricted content, bypass censorship, and enhance security when using public Wi-Fi networks
Q54. 4 types of c's and veteran loan
The 4 C's of credit are important for veteran loans.
The 4 C's are: credit, capacity, collateral, and character.
Credit refers to the borrower's credit score and history.
Capacity refers to the borrower's ability to repay the loan.
Collateral refers to the assets that can be used to secure the loan.
Character refers to the borrower's reputation and willingness to repay the loan.
These factors are important for determining the borrower's eligibility for a veteran loan.
Q55. Write a program to print Fibonacci series
Program to print Fibonacci series
Declare two variables to store the first two numbers of the series
Use a loop to generate the next numbers in the series
Print each number as it is generated
Q56. Program to print average of number series
Program to print average of number series
Create a variable to store the sum of the numbers in the series
Create a variable to store the count of numbers in the series
Loop through the series and add each number to the sum variable
Increment the count variable for each number in the series
Calculate the average by dividing the sum by the count
Print the average
Q57. What is QA's KRA?
QA's KRA is to ensure that the software meets the quality standards and requirements.
Develop and implement quality assurance policies and procedures
Identify and resolve defects and bugs
Perform testing and analysis to ensure software meets quality standards
Collaborate with development teams to improve product quality
Provide feedback and recommendations for improvement
Ensure compliance with industry standards and regulations
Q58. What are 4 pillars of oops
The 4 pillars of OOP are Inheritance, Encapsulation, Abstraction, and Polymorphism.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation restricts access to certain components within a class, protecting the data.
Abstraction hides the complex implementation details and only shows the necessary features.
Polymorphism allows objects to be treated as instances of their parent class.
Q59. Program to print sum of 2 numbers
Program to print sum of 2 numbers
Declare 2 variables to store the numbers
Add the variables and store the result in another variable
Print the result
Q60. What is shortest path algo
Shortest path algo is a method to find the most efficient route between two points in a graph or network.
Shortest path algorithms are used in various applications such as GPS navigation systems, network routing, and logistics planning.
Examples of shortest path algorithms include Dijkstra's algorithm, Bellman-Ford algorithm, and Floyd-Warshall algorithm.
These algorithms calculate the shortest path based on different criteria such as distance, time, or cost.
The goal is to find ...read more
Q61. Seperate words and number program in Java.
A program in Java to separate words and numbers.
Use regular expressions to separate words and numbers.
Iterate through the input string and check if each character is a word or a number.
Store the words and numbers in separate arrays.
Q62. CICD setups with different tools
CICD setups involve integrating various tools for automation and continuous delivery.
Use Jenkins for building, testing, and deploying code
Integrate with version control systems like Git for source code management
Utilize Docker for containerization and Kubernetes for orchestration
Implement monitoring tools like Prometheus and Grafana for tracking performance
Automate testing with tools like Selenium or JUnit
Q63. What is primary and secondary
Primary and secondary are terms used to describe different levels or stages of importance or priority.
Primary refers to something that is of utmost importance or the main focus.
Secondary refers to something that is of lesser importance or comes after the primary.
Primary and secondary can be used in various contexts, such as education, healthcare, or business.
In education, primary education refers to the first stage of formal schooling, while secondary education refers to the ...read more
Q64. What is stock ?
Stock refers to the ownership shares of a company that are publicly traded on a stock exchange.
Stock represents ownership in a company.
Investors buy and sell stocks to earn a return on their investment.
Stocks are traded on stock exchanges like the New York Stock Exchange (NYSE) or NASDAQ.
Stock prices can fluctuate based on supply and demand, company performance, and market conditions.
Dividends may be paid to stockholders as a share of the company's profits.
Examples of well-kn...read more
Q65. What is regression testing
Regression testing is the process of retesting a software application to ensure that new code changes have not adversely affected existing functionality.
Regression testing is performed after code changes to verify that the existing functionality still works correctly.
It helps in identifying any defects introduced by new code changes.
Automated testing tools are often used for regression testing to save time and effort.
Regression testing is an important part of the software dev...read more
Q66. What is Ad hoc testing
Ad hoc testing is informal testing without any specific test cases or plans.
Ad hoc testing is performed randomly without any predefined test cases.
It is usually done to explore the system and find defects that are not covered in regular testing.
Testers use their domain knowledge and experience to perform ad hoc testing.
It is not documented and can be difficult to reproduce.
Examples include randomly clicking on buttons, entering unexpected data, or testing edge cases.
Q67. What is IPO and how it works
Q68. Troubleshooting with EKS
Troubleshooting with EKS involves identifying and resolving issues within an Amazon EKS cluster.
Check the status of EKS nodes and pods
Review logs for errors and warnings
Verify network connectivity within the cluster
Monitor resource utilization to identify bottlenecks
Use kubectl commands to inspect and troubleshoot
Q69. Program to Print palindrome
Program to print palindrome
A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward
To check if a string is a palindrome, we can compare the first and last characters, then the second and second-to-last characters, and so on
If all pairs match, the string is a palindrome
We can use a loop to iterate through the string and compare the characters
Q70. What is capital
Capital refers to financial assets or resources owned by a business or individual that can be used for generating income or investment.
Capital can include cash, equipment, property, investments, and other assets.
It is essential for businesses to have enough capital to cover expenses and invest in growth.
Capital can be raised through equity financing (selling ownership stakes) or debt financing (borrowing money).
Q71. Basic troubleshooting steps
Basic troubleshooting steps involve identifying the problem, researching solutions, implementing fixes, and testing to ensure resolution.
Identify the issue by asking questions and gathering information
Research possible solutions through knowledge base, documentation, or online resources
Implement fixes by following step-by-step instructions or using troubleshooting tools
Test the solution to ensure the problem is resolved
Top HR Questions asked in Carrier
Interview Process at Carrier
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month