Infosys DSE Technical Interview Questions

Infosys DSE Technical Interview Questions and Answers 2023

On this page, you will find the most recently asked Technical Questions asked in Infosys DSE Technical Interview 2023.

Page Highlights:-

  • Infosys DSE Test Pattern
  • Top 20 Infosys DSE Technical Interview Questions
Find middle element of Linked List

Infosys DSE Interview Pattern

Online Test

There are three coding questions asked in the online test. The test has a sectional and overall cut-off.

  • Question 1:- Basic questions on algorithms and data structures.
  • Question 2:- Greedy’s Algorithm
  • Question 3:- Dynamic Programming

Programming languages allowed in this exam:- C, C++, Java, Python

Top 20 Infosys DSE Technical Interview Questions

Question 1: What is DLL and EXE file extension?


EXE File: The EXE file extension is associated with executable files and denotes that the file is a program. It is self-contained. EXEs have their own memory and process space.

DLL File: DLL stands for dynamic link library, and it contains functions and operations that are used by other programs. This DLL can be used by a variety of applications. It will consume the same amount of memory and process space as the caller application.

Question 2:- What is a virtual function?


A virtual function is a member function that you intend to be redefined in derived classes. A virtual function for that object may be called and the derived class’s version of the function may be executed when you refer to an object of a derived class using a pointer or a reference to the base class.

Question 3: What is a pointer?


A variable that stores the address of another variable is known as a pointer. Pointers enable the use of addresses to pass variables by references.

Questions 4: What are the conditional statements?


Conditional statements are also known as conditional expressions. The set of rules that are carried out if a specific condition is true are known as conditional statements. It is frequently referred to as a “if-then” statement since the statement is only performed if the statement is executed.

Question 5: What are 4 basic oops concepts?


Object-oriented programming has four basic concepts: 

  • Encapsulation
  • Abstraction
  • Inheritance
  • Polymorphism.

Question 6: Write code for the LCA of a string.


struct node
   int data;
   struct node* left, *right;

struct node *lca(struct node* root, int n1, int n2)
   while (root != NULL)
       if (root->data > n1 && root->data > n2)
       root = root->left;

       else if (root->data < n1 && root->data < n2)
       root = root->right;

       else break;
   return root;

struct node* newNode(int data)
   struct node* node = (struct node*)malloc(sizeof(struct node));
   node->data = data;
   node->left = node->right = NULL;

int main()
   struct node *root     = newNode(20);
   root->left             = newNode(8);
   root->right             = newNode(22);
   root->left->left         = newNode(4);
   root->left->right     = newNode(12);
   root->left->right->left = newNode(10);
   root->left->right->right = newNode(14);

   int n1 = 10, n2 = 14;
   struct node *t = lca(root, n1, n2);
   printf("LCA of %d and %d is %d \n", n1, n2, t->data);

   n1 = 14, n2 = 8;
   t = lca(root, n1, n2);
   printf("LCA of %d and %d is %d \n", n1, n2, t->data);

   n1 = 10, n2 = 22;
   t = lca(root, n1, n2);
   printf("LCA of %d and %d is %d \n", n1, n2, t->data);

   return 0;

Question 7: What are the ACID properties?


A transaction is a unique logical unit of work that accesses and might modify a database’s contents. Both read and write operations are used by transactions to access data. Certain attributes are followed before and after the transaction in order to preserve consistency in a database. These are referred to as ACID characteristics.

Question 8: What are the SQL tables?


In a database, a table is a group of related data organized in a structured way. There are rows and columns in a table.

Questions 9: What is a package?


A set of connected classes and interfaces are arranged in a namespace called a package.

Question 10: What is Clone() in java?


A shallow copy of the object is created by the Java Object clone() function. The shallow copy in this case refers to the creation of a new object and the copying of all the fields and methods related to the new object.

The syntax of the clone() method is: object.clone()

Question 11: What is SDLC?


The Software Development Life Cycle (SDLC) is a complete procedure that specifies the progression of a project’s development from the stage of gathering requirements through the level of maintenance and support. Requirements analysis, planning, definition, design, development, testing, deployment, and support are the steps of the SDLC.

Question 12: Can we overload the main method?


Yes, The main method in Java can be overloaded, however, when a class is executed, the JVM first calls the public static void main(String[] args) method.

Question 13: What is Applet?


A Java program that runs in a web browser is known as an applet. Due to the fact that it has access to the complete Java API, an applet can be a fully functional Java application.


Question 14: What is the normalization of databases, and joins?


Normalization: The practice of effectively structuring data in a DBMS without any data loss is known as normalization.

Join: In DBMS, this clause is used to merge rows from two or more tables based on a shared column.

Question 15: Write a program to check whether a number is a palindrome or not in C++.

//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;


    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";


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


// Time Complexity : O(N)

// Space Complexity : O(1)

// where N is the number of digits in num

Question 16: What is a View?


A view is a virtual table that only includes a portion of the information in a database. It takes up less storage because there are no views. Data from one or more tables may be integrated in a view, depending on the link.

Question 17: Mention some high-level programming languages.


Some high-level programming languages are

  • C++
  • C
  • Python
  • PHP
  • JavaScript
  • Java

Question 18: Write a code to check whether a given year is a leap year or not in JAVA

// Leap year program in Java
// If the year satisfies either of the conditions, it's considered a leap year -
// 1. The year must be divisible by 400.
// 2. The year must be divisible by 4 but not 100.public class Main
public static void main (String[]args)

int year = 2020;

if (year % 400 == 0)
System.out.println (year + " is a Leap Year");

else if (year % 4 == 0 && year % 100 != 0)
System.out.println (year + " is a Leap Year");

System.out.println (year + " is not a Leap Year");


Question 19: Define a Token in C++ programming language.


The smallest C++ items that a compiler can comprehend are tokens. Identifiers, keywords, literals, operators, punctuation, and other separators are examples of tokens.

Question 20: Write a code for bubble sort in C++


using namespace std;

void swap(int *var1, int *var2)


int temp = *var1;

*var1 = *var2;

*var2 = temp;


//Here we will implement bubbleSort.

void bubbleSort(int arr[], int n)


int i, j;

for (i = 0; i < n-1; i++)

//Since, after each iteration rightmost i elements are sorted.

for (j = 0; j < n-i-1; j++) if (arr[j] > arr[j+1])

swap(&arr[j], &arr[j+1]);


// Function to print array.

void display(int arr[], int size)


int i;

for (i=0; i < size; i++)

cout << arr[i] << "\t";



//Main function to run the program.

int main()


int array[] = {5, 3, 1, 9, 8, 2, 4,7};

int size = sizeof(array)/sizeof(array[0]);

cout<<"Before bubble sort: \n";

display(array, size);//Calling display function to print unsorted array.

bubbleSort(array, size);

cout<<"After bubble sort: \n";

display(array, size);//Calling display function to print sorted array.

return 0;