Mphasis Technical Interview Questions

Mphasis Technical Interview Questions and Answers 2022

Mphasis recruiters give more attention to the technical portion. You must be well-versed in fundamental ideas like C, C++, Java, DSA, OS, and networks.

On this page, you’ll find the frequently asked technical interview questions and their respective answers for the Mphasis technical interview in 2022.

Mphasis Technical Interview Questions

Top 20 Mphasis Technical Interview Questions

Question 1: What is the use of the function in C?

Answer:

  • C functions are used to prevent rewriting the same code over and over again.
  • C functions can be called from anywhere in our program.
  • When we divide a program into functions, we can easily track any part of it.
  • C functions provide the concept of reusability, which means that they divide a large task into smaller tasks, making the C program more understandable.

Question 2:- What are the basic clouds in cloud computing?

Answer:

In cloud computing, there are three types of clouds:

  • Professional cloud
  • Personal cloud
  • Performance cloud

Question 3: What is a pointer to pointers in C?

Answer:

A pointer to pointer relationship refers to one pointer referencing the address of another pointer. The chain of pointers is called a pointer to pointer. The pointer typically contains the address of a variable. The initial pointer’s address is contained in the pointer to pointer.

Questions 4: Write the difference between abstract class and interface.

Abstract class Interface
Both abstract and non-abstract methods can be found in abstract classes. Interfaces are limited to abstract methods. Since Java 8, it is also possible to have default and static methods.
Abstract classes do not enable multiple inheritance. The interface allows for multiple inheritance.
Variables in an abstract class may be final, non-final, static, or non-static. The only variables in an interface are static and final
It is possible to implement an interface using an abstract class. It is impossible for an interface to give an abstract class implementation.
Declaring an abstract class requires the usage of the abstract keyword. Declaring an interface requires the usage of the interface keyword.
An abstract class can implement numerous Java interfaces and extend other Java classes. A Java interface can only be extended by another Java interface.

Question 5: What are multiple inheritances?

Answer:

In the case of multiple inheritances, a derived class may have multiple base classes from which it inherits properties.

Question 6: What are some common clauses used with SELECT queries in SQL?

SELECT QUERYUSES

WHERE 

WHERE clause is used to select records that must be kept depending on particular criteria.
ORDERUsed to perform an ascending (ASC) or descending (DESC) sort on the records based on one or more fields (DESC).
GROUP

It can be used in conjunction with several aggregating algorithms to obtain grouped records with the same data from the database.

HAVINGUsing the GROUP BY clause in addition to filtering records In contrast to WHERE, which cannot filter aggregated records, it is different.

Question 7: What do you mean by marker interfaces in java?

Answer:

Marker interfaces, commonly referred to as tagging interfaces, are interfaces without defined methods and constants. They are there to assist the compiler and JVM in obtaining information about the objects that is relevant to run time.

Question 8: What is the network topology?

Answer:

Network topology is a physical layout of the network, connecting the different nodes using the links. It depicts the connectivity between the computers, devices, cables, etc

Questions 9:Write a program for Fibonacci using C++.

// Write a program to print fibonacci series in C++
#include 
using namespace std;

int main()
{
    int num = 15;
    int a = 0, b = 1;
    
    // Here we are printing 0th and 1st terms
    cout << a << ", " << b << ", ";
    
    int nextTerm;
    
    // printing the rest of the terms here
    for(int i = 2; i < num; i++){
        nextTerm = a + b;
        a = b;
        b = nextTerm;
        
        cout << nextTerm << ", ";
    }

    return 0;
}
						

Question 10: What are the different types of operations that are possible on semaphore?

Answer

There are basically two atomic operations that are possible:

  • Wait()
  • Signal

Question 11: Define an abstract class in JAVA.

Answer

An abstract class in java is a class that is declared with an abstract keyword.

Question 12: Write a program to print the sum of digits in JAVA.

public class Main
 {
   public static void main (String[]args)
   {

     int num = 12345, sum = 0;



     //loop to find sum of digits
     while(num!=0){
         sum += num % 10;
         num = num / 10;
     }

     //output
       System.out.println ("Sum of digits : " + sum);
   }


 }
						

Question 13: Define join.

Answer:

One of the most helpful operations in relational algebra is the join operation. It is the method that is most frequently used to combine data from two or more relations. The same or a comparable column is always used to accomplish a join. The SQL JOIN command is used in the majority of complex queries.

  • Inner Joins
  • Outer Joins

Question 14: Define identifier in C.

Answer:

In a C program, identifiers are the name provided to each program piece. Identifiers include names used to identify variables, functions, and arrays. 

Example: In the programme above, the integer variable named x has that name.

Question 15: What is the main purpose of OSPF?

Answer:

A link-state routing protocol called OSPF, or Open Shortest Path First, uses routing tables to find the optimum route for data transmission.

Question 16: Write a C++ program to check palindrome numbers.

//C++ Program to check whether a number is palindrome or not

#include <iostream>

using namespace std;

//main program

int main ()

{

    //variables initialization

    int num, reverse = 0, rem, temp;

    num=12321;

    cout <<"\nThe number is: "<<num; 

    temp = num;

    //loop to find reverse number

    while(temp != 0)

    {

        rem = temp % 10;

        reverse = reverse * 10 + rem;

        temp /= 10;

    };

    // palindrome if num and reverse are equal

    if (num == reverse)

        cout << num << " is Palindrome";

    else

        cout << num << " is not a Palindrome";

}

// Time Complexity : O(N)

// Space Complexity : O(1)

// where N is the number of digits in num						

Question 17: What do you mean by dangling pointer?

Answer:

A dangling pointer is one that is pointing to an empty region in memory.

Question 18: Write a c program to reverse a number.

#include

//main program
int main ()
{
  //variables initialization
  int num, reverse = 0, rem;
  num=1234;
  printf("The number is: %d\n",num);
  
 
  //loop to find reverse number
    while(num != 0)
    {
      rem = num % 10;
      reverse = reverse * 10 + rem;
      num /= 10;
    };
 
  //output
  printf("Reverse: %d\n",reverse);
  
  return 0;
}
// Time complexity O(N)
// Space complexity : O(1)
						

Question 19: What is the main purpose of an OS? What are the different types of Operating systems?

Answer:

An operating system’s primary function is to run user programs, facilitate user understanding of and interaction with computers, and run applications. It is specifically created to better the computer system’s performance by controlling all computing operations. Additionally, it controls the memory, operations, and functionality of all hardware and software.

Types of OS:

  • Batched OS (Example: Payroll System, Transactions Process, etc.)
  • Multiprogrammed OS (Example: Windows O/S, UNIX O/S, etc.)
  • Time Sharing OS (Example: Multics, etc.)
  • Distributed OS (LOCUS, etc.)
  • Real-Time OS (PSOS, VRTX, etc.)

Question 20: What are the advantages of using a VPN?

Answer:

Using a VPN has the following benefits:

  • When compared to WAN connections, VPN is more affordable and is used to remotely connect offices in various geographic regions.
  • Between several offices spread across various regions, VPN is utilized for safe transactions and private data transfer.
  • By leveraging virtualization, a VPN protects a company’s information against any potential risks or invasions.
  • VPN masks online identity and encrypts internet data.