IBM Technical Interview Questions

IBM Technical Interview Questions and Answers 2023

This page will highlight the IBM Interview Process as well as some of the technical interview questions asked in the IBM Interview 2023.

Page Highlights:-

  • IBM Test Pattern
  • Top 20 IBM Technical Interview Questions
transpose of a matrix in c

IBM Test Pattern

Name Of The SectionNumber of Question
Cognitive Ability Test6 Questions
English Language Test10 Questions
Learning Agility Assessments50 Questions
Coding Test1 Code and 5 MCQ
Total72 Question

Top 20 IBM Technical Interview Questions

Question 1: What are semaphores?

Answer:

A semaphore is a synchronization object that restricts access by many processes to a shared resource in a parallel programming environment. Semaphores are often used to control access to files and shared memory.

Question 2:- What is synchronization?

Answer:

The ability to manage multiple threads’ access to any shared resource is known as synchronization. The term “synchronized” applies to both the procedures and the blocks. If a method is marked as synchronized, only one thread at a time is permitted to execute it on the provided object. The primary benefit of synchronized keywords is that we can avoid data inconsistency issues.

Question 3: What is meant by an entry-controlled loop?

Answer:

In an entry-controlled loop, the control conditions are assessed before the loop execution starts. The body of the loop is run even if none of the conditions are true. It’s also known as the pre-test loop.

Questions 4: What is the variable’s scope?

Answer:

The scope of something refers to the extent to which it can be worked with. The section of the computer program where a variable can be accessed, declared, or used is known as the variable’s scope in programming.

Question 5: What are strings?

Answer:

A string is a collection of characters that can be used in computer programming either as a literal constant or as a variable. The latter can be fixed or variable in length, allowing for variable length.

Question 6: State an advantage of stored procedures.

Answer:

Modular programming is the use of a stored procedure, which entails developing, storing, and invoking it repeatedly as needed. This promotes quicker execution. It also minimises network traffic and increases data security.

Question 7: 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 8: What is OODBMS?

Answer:

An object-oriented database management system (OODBMS) is a database management system that uses object-oriented programming concepts to manage persistent objects on behalf of many users, including safety, stability, restoration, and demand management features.

Questions 9: What is a function?

Answer:

A function is a collection of statements and operations that accomplishes a certain goal. Every piece of code has at least one function, and more can be added to simplify and reduce the same code repeatedly.

Question 10: What is virtual memory?

Answer:

Virtual memory is a method that is commonly utilized in computer operating systems (OS). When physical memory is inadequate, a computer can compensate by using virtual memory, which temporarily shifts data from random access memory (RAM) to disc storage.

Question 11: What are the different types of Schedulers in OS?

Answer:

A scheduler can be divided into 3 types:

  • Long Term Scheduler
  • Short Term Scheduler
  • Medium Term Scheduler

Question 12: What are the main features of cloud services?

Answer:

The cloud service includes the following important components:

  • Developing programs that can manage multiple clients.
  • Using and maintaining commercial software.
  • The software update feature is centralized, which reduces the need to download upgrades.
  • centralizing web-based software management activities.

Question 13: 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 14: What are the advantages of inheritance?

Answer:

  • Inheritance reduces code repetition and promotes code extensibility.
  • Because existing code is reused, development and maintenance costs are reduced.
  • Inheritance encourages reuse.
  • Reusability increased dependability.
  • Inheritance forces sub-classes to adhere to a standardized interface.

Question 15: Can you share a process between Windows services?

Answer:

Yes, a process can be shared between Windows services.

Question 16: What is a spanning Tree?

Answer:

A spanning tree is a tree that is connected to a network. On the tree, all of the graph’s nodes appear only once. A minimum spanning tree is a spanning tree that is structured in such a way that the total edge weight between nodes is reduced.

Question 17: Write a program to Swap two variables in python without using third variable.

a=int(input(“Enter value : “))
b=int(input(“Enter value : “))

print(“Before swapping a :”,a)
print(“Before swapping b :”,b)
#logic to swap without using third variable 
a=a+b 
b=a-b
a=a-b


print(“After swapping a becomes :”,a)
print(“After swapping b becomes :”,b) 
						

Question 18: 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 19: What is the purpose of 'SUDO' Command?

Answer:

The purpose of sudo is to execute the command with root privileges. The purpose of su is to change the current client setting. It is fundamentally a precursor of sudo. In the event that no client name is identified, root is used instead of su.

Question 20: Write a program to remove vowels from a string.

#include
#include

int main() {
    // Initializing variable.
    char str[100];
    int i, j, len = 0;

    // Accepting input.
    printf("Enter a string : ");
    // gets(str);
    scanf("%s", str);

    len = strlen(str);
    // Accepting input.

    for (i = 0; i < len; i++) {
        // Checking vowels.
        if (str[i] == 'a' || str[i] == 'e' || str[i] == 'i' || str[i] == 'o' || str[i] == 'u' ||
            str[i] == 'A' || str[i] == 'E' || str[i] == 'I' || str[i] == 'O' || str[i] == 'U') {
            // Deleting vowels.
            for (j = i; j < len; j++) {
                // Storing string without vowels.
                str[j] = str[j + 1];
            }
            i--;
            len--;
        }
        str[len + 1] = '\0';
    }
   printf("After deleting the vowels, the string will be : %s", str);
   return 0;
}