后端-02-大型机与遗留系统
标签搜索
后端-02-大型机与遗留系统
程序员的自留地

后端-02-大型机与遗留系统

fiora
2026-10-21 / 0 评论 / 8 阅读
本段 27 题 | 来源:backend + general + design | 知识点:大型机与遗留系统

1. What do you understand about procedural programming? How is it different from object oriented programming?

你对过程式编程有何理解?它与面向对象编程有何不同?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf18b | 官方: 否 | 付费: 否

答案:

Procedural programming is a programming model that evolved from structured programming and is based on the concept of invoking procedures. Procedures, often known as routines, subroutines, or functions, are essentially a set of instructions to be executed. Any procedure in a program can be invoked at any time during execution, either by other procedures or by the program itself.

过程式编程是一种从结构化编程演变而来的编程模型,基于调用过程的概念。过程,通常称为例程、子例程或函数,本质上是一组要执行的指令。程序中的任何过程都可以在执行期间的任何时候被其他过程或程序本身调用。

The following table illustrates the differences between procedural programming and object-oriented programming:

下表说明了过程式编程与面向对象编程之间的区别:
Procedural Programming
过程式编程
Object-Oriented Programming
面向对象编程
In procedural programming, the program is broken down into little modules known as functions.
在过程式编程中,程序被分解为称为函数的小模块。
Object-oriented programming divides a program into discrete pieces called objects.
面向对象编程将程序划分为称为对象的离散部分。
The top-down technique is used in procedural programming.
过程式编程使用自顶向下技术。
The bottom-up method is used in object-oriented programming.
面向对象编程使用自底向上方法。
It's not straightforward to add new data and functions.
添加新的数据和函数并不简单。
It's simple to add additional data and functions.
添加额外的数据和函数很简单。
Overloading is not possible with procedural programming.
过程式编程无法实现重载。
In object-oriented programming, overloading is possible.
面向对象编程可以实现重载。
Because procedural programming lacks a proper method for hiding data, it is insecure.
由于过程式编程缺乏适当的数据隐藏方法,因此不安全。
Data is hidden in object-oriented programming, making it safer.
面向对象编程中数据是隐藏的,因此更安全。
In procedural programming, function takes precedence over data.
在过程式编程中,函数优先于数据。
Data is more important than function in object-oriented programming.
在面向对象编程中,数据比函数更重要。
C, FORTRAN, Pascal, Basic, and other programming languages are examples.
C、FORTRAN、Pascal、Basic等编程语言是示例。
C++, Java, Python, C#, and other programming languages are examples.
C++、Java、Python、C#等编程语言是示例。

2. What are the three types of schedulers in the context of operating systems? Explain.

在操作系统的上下文中,调度器有哪三种类型?请解释。
  • 知识点: 大型机与遗留系统 / 行为与软技能 (标签: interviewbit, ibm, company-specific)
  • 类型: behavioral | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf18e | 官方: 否 | 付费: 否

答案:

Schedulers are specialised computer programs that manage process scheduling in a variety of ways. Their primary responsibility is to choose which jobs to submit into the system and which processes to run.

调度器是专门的计算机程序,以多种方式管理进程调度。它们的主要职责是选择哪些作业提交到系统以及哪些进程运行。

Following are the three types of schedules:

以下是三种类型的调度器:
  • Long Term Scheduler: It is also known as a job scheduler. A long-term scheduler determines which programs are accepted for processing into the system. It chooses processes from the ready queue and loads them into memory so they can be executed. For CPU scheduling, the process loads into memory. The job scheduler's main goal is to deliver a balanced mix of jobs, such as I/O bound and CPU bound workloads. It also regulates how much multiprogramming is done. If the degree of multiprogramming remains constant, the average rate of process creation must be equal to the average rate of process departure from the system.
  • Medium Term Scheduler: Medium Term Schedulers are used for swapping processes in the main memory. It clears the memory occupied by the processes. The degree of multiprogramming is reduced as a result. The swapped out-processes are handled by the medium-term scheduler.
  • Short Term Scheduler: It's also referred to as a CPU scheduler. Its primary goal is to improve system performance in accordance with the set of criteria established. It is the transition from the process's ready to running stage. The CPU scheduler chooses a process from among those that are ready to run and allocates CPU to that process. Short-term schedulers usually referred to as dispatchers, decide which process to run next.

3. What do you know about virtual memory in the context of operating systems?

在操作系统的上下文中,你对虚拟内存了解多少?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf191 | 官方: 否 | 付费: 否

答案:

Virtual Memory is a storage allocation system that allows secondary memory to be addressed as if it were the main memory. The addresses used by an application to refer to memory are distinct from the addresses used by the memory system to designate physical storage sites, and program-generated addresses are automatically translated to machine addresses.

虚拟内存是一种存储分配系统,允许将辅助内存当作主内存来寻址。应用程序用于引用内存的地址与内存系统用于指定物理存储位置的地址不同,程序生成的地址会自动转换为机器地址。

The capacity of virtual storage is limited by the computer system's addressing method, and the amount of secondary memory available is determined by the number of main storage sites available rather than the actual number of main storage locations.

虚拟存储的容量受计算机系统寻址方式的限制,可用的辅助内存量取决于可用的主存储位置数量,而不是实际的主存储位置数量。

4. What is the purpose of the sudo command in the context of the UNIX operating system?

在UNIX操作系统的上下文中,sudo命令的用途是什么?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf194 | 官方: 否 | 付费: 否

答案:

sudo is a short form of Super Users DO. In Linux, the sudo command is commonly used as a prefix to a command that only superusers are permitted to run. If you use the prefix "sudo" before any command, it will run it with elevated privileges, allowing a user with the necessary permissions to run a command as another user, such as the superuser. This is the Windows version of the "run as administrator" option.

sudo 是 Super Users DO 的缩写。在 Linux 中,sudo 命令通常用作只有超级用户才被允许运行的命令的前缀。如果你在任何命令前使用前缀 "sudo",它将以提升的权限运行该命令,允许具有必要权限的用户以另一个用户(例如超级用户)的身份运行命令。这是 Windows 中"以管理员身份运行"选项的对应版本。

The sudoers file, stored at "/etc/sudoers," must contain an entry for each user who may use the sudo command. Remember to use the sudo command to edit or inspect the sudoers file. The "visudo" command is suggested for editing the sudoers file.

sudoers 文件存储在 "/etc/sudoers",必须为每个可能使用 sudo 命令的用户包含一个条目。请记住使用 sudo 命令来编辑或查看 sudoers 文件。建议使用 "visudo" 命令来编辑 sudoers 文件。

5. Write a program to calculate how many ways can we make change for N cents if we have an endless supply of each of the C = C1, C2,..Cm valued coins? It makes no difference what order the coins are placed in.

编写一个程序,计算如果我们有无限供应的每种面值为 C = C1, C2,..Cm 的硬币,有多少种方式可以为 N 分钱找零?硬币的排列顺序无关紧要。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf197 | 官方: 否 | 付费: 否

答案:

Example: Input : N = 4, C = { 1, 2, 3} Output : 4 Explanation: There are 4 possible combinations : {1, 1, 1, 1}, {1, 1, 2}, {1, 3}, {2, 2}

示例:输入:N = 4, C = { 1, 2, 3} 输出:4 解释:有 4 种可能的组合:{1, 1, 1, 1}, {1, 1, 2}, {1, 3}, {2, 2}

Input : N = 10, C = {2, 3, 5, 6} Output : 5 Explanation: There are 5 possible combinations ; {2, 2, 2, 2, 2}, {2, 2, 3, 3}, {2, 2, 6}, {2, 3, 5}, {5, 5}

输入:N = 10, C = {2, 3, 5, 6} 输出:5 解释:有 5 种可能的组合;{2, 2, 2, 2, 2}, {2, 2, 3, 3}, {2, 2, 6}, {2, 3, 5}, {5, 5}

Approach:

方法:
We can divide all set solutions into two sets to count the total number of solutions.
我们可以将所有解的集合分为两个集合来计算解的总数。

1) Solutions that are devoid of the mth coin (or Cm).

1) 不包含第 m 个硬币(或 Cm)的解。

2) At least one Cm is present in the solution.

2) 解中至少包含一个 Cm。

If solve(C[], m, n) is the function for counting the number of solutions, it may be represented as the sum of solve(C[], m-1, n) and solve(C[], m, n-Cm). We will use dynamic programming to store the result for a particular value of n and m. This will optimise our time complexity to O(nm).

如果 solve(C[], m, n) 是用于计算解数的函数,它可以表示为 solve(C[], m-1, n) 和 solve(C[], m, n-Cm) 之和。我们将使用动态规划来存储特定 n 和 m 值的结果。这将把我们的时间复杂度优化到 O(nm)。

Code:

代码:

include<bits/stdc++.h>

using namespace std;

using namespace std;
// function to count the number of ways n can be represented from a coin set of size m
// 用于计算从大小为 m 的硬币集合中表示 n 的方式数的函数
int solve( int C[], int m, int n )
int solve( int C[], int m, int n )
{
int dpn + 1;//Creating a 2D matrix of size (n + 1) 8 m to store the result of each state of our problem
int dpn + 1;//创建一个大小为 (n + 1) 8 m 的二维矩阵,用于存储我们问题每个状态的结果

// Filling the matrix for the base case when n = 0

// 为 n = 0 的基本情况填充矩阵
for (int i = 0; i < m; i++)
for (int i = 0; i < m; i++)
dp0 = 1;
dp0 = 1;

// Filling the entries in the dp table in bottom up fashion

// 以自底向上的方式填充dp表中的条目
for (int i = 1; i < n + 1; i++)
for (int i = 1; i < n + 1; i++)
{
for (int j = 0; j < m; j++)
for (int j = 0; j < m; j++)
{
// Including C[j] in our current state's answer
// 将C[j]包含在我们当前状态的答案中
int x = (i-C[j] >= 0) ? dp[i - C[j]][j] : 0;
int x = (i-C[j] >= 0) ? dp[i - C[j]][j] : 0;

// Excluding C[j] in our current state's answer

// 将C[j]排除在我们当前状态的答案中
int y = (j >= 1) ? dpi : 0;
int y = (j >= 1) ? dpi : 0;

// storing the sum of x and y in our current state's answer

// 将x和y的和存储在我们当前状态的答案中
dpi = x + y;
dpi = x + y;
}
}
return dpn;
return dpn;
}

int main()

int main()
{
int C[] = {2, 3, 5, 6};
int C[] = {2, 3, 5, 6};
int m = sizeof(C)/sizeof(C[0]);
int m = sizeof(C)/sizeof(C[0]);
int n = 10;
int n = 10;
cout << solve(C, m, n);
cout << solve(C, m, n);
return 0;
return 0;
}
Output:
输出:

5
Explanation:

说明:

In the above code, we define a function named ‘solve’ which returns the number of ways in which n can be represented from a set of m coins having distinct values. We create a dp table of size (n+1) * m. dpi represents the number of ways in which i can be represented by a set of j coins. Here, we have used the recurrence formula dpi = x + y. Here, x = dp[i - C[j]][j], y = dpi.

在上面的代码中,我们定义了一个名为‘solve’的函数,它返回用一组具有不同值的m个硬币表示n的方法数。我们创建一个大小为(n+1) * m的dp表。dpi表示用一组j个硬币表示i的方法数。在这里,我们使用了递推公式dpi = x + y。其中,x = dp[i - C[j]][j],y = dpi。

6. Write a program to convert the characters of a string into the opposite case, that is, if a character is lowercase, convert it to upper case and vice versa.

编写一个程序,将字符串中的字符转换为相反的大小写,即,如果字符是小写,则将其转换为大写,反之亦然。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf19a | 官方: 否 | 付费: 否

答案:

Input : “inTerVieWbiT” Output : “INtERvIEwVIt”

输入:“inTerVieWbiT” 输出:“INtERvIEwVIt”

Input : “Hello World” Output : “hELLO wORLD”

输入:“Hello World” 输出:“hELLO wORLD”

Approach:

方法:
We scan each character of the string one by one. If the current character is in lowercase, we subtract 32 from the character and convert it to uppercase. Similarly, if the current character is in uppercase, we add 32 to the character and convert it to lowercase.
我们逐个扫描字符串中的每个字符。如果当前字符是小写,我们从该字符中减去32并将其转换为大写。同样,如果当前字符是大写,我们向该字符加上32并将其转换为小写。

Code:

代码:

include

using namespace std;

using namespace std;

// Function to convert the characters of the string to its opposite case

// 将字符串中的字符转换为相反大小写的函数
void changeCase(string& s)
void changeCase(string& s)
{
int len = s.length();
int len = s.length();
for (int i = 0; i < len; i++) {
for (int i = 0; i < len; i++) {
if (s[i] >= 'a' && s[i] <= 'z')
if (s[i] >= 'a' && s[i] <= 'z')
{
s[i] = s[i] - 32;// Subtracting 32 from the character
s[i] = s[i] - 32;// 从字符中减去 32
}
else if (s[i] >= 'A' && s[i] <= 'Z')
else if (s[i] >= 'A' && s[i] <= 'Z')
{
s[i] = s[i] + 32;// Adding 32 to the character
s[i] = s[i] + 32;// 给字符加上 32
}
}
}

int main()

int main()
{
string s = "inTerVieWbiT";
string s = "inTerVieWbiT";
cout << "Original String : " << s << "\n";
cout << "Original String : " << s << "\n";
changeCase(s);
changeCase(s);
cout << "Changed String : " << s << "\n";
cout << "Changed String : " << s << "\n";
return 0;
return 0;
}
Output:
输出:

Original String : inTerVieWbiT

Original String : inTerVieWbiT
Changed String : INtERvIEwBIt
更改后的字符串:INtERvIEwBIt
Explanation :
解释:

In the above code, we define a function named ‘changeCase’ which takes a reference of a string as a parameter. We iterate through each character of the string and change the character to its opposite case by either adding or subtracting 32.

在上面的代码中,我们定义了一个名为‘changeCase’的函数,它接受一个字符串的引用作为参数。我们遍历字符串中的每个字符,并通过加上或减去32将字符更改为其相反的大小写。

7. Given a sorted array of 0s and 1s. The goal is to discover the index of the sorted array’s first '1'. It's possible that the array is made up entirely of 0s or 1s. If there are no 1's in the array, display "-1."

给定一个由0和1组成的有序数组。目标是找到有序数组中第一个‘1’的索引。数组可能完全由0或1组成。如果数组中没有1,则显示“-1”。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf19d | 官方: 否 | 付费: 否

答案:

Example: Input: arr = {0, 0, 0, 0, 1, 1, 1} Output : 4

示例:输入:arr = {0, 0, 0, 0, 1, 1, 1} 输出:4

Input : Arr = {0, 0, 0, 0} Output : -1

输入:Arr = {0, 0, 0, 0} 输出:-1

Approach:

方法:
It is given that the array is sorted. We use this property of the array and apply binary search to find the first occurrence of 1 in the given array. We start with the whole array as our search space and find the middle element. If we encounter 0 as the middle element, it implies that our answer lies to the right side of the middle element. If we encounter 1 as the middle element, our answer can either be this index or the indices left to the current middle if there are more 1s preceding the current middle.
已知数组是有序的。我们利用数组的这一特性,应用二分查找来找到给定数组中1的第一次出现。我们从整个数组作为搜索空间开始,找到中间元素。如果中间元素是0,这意味着我们的答案位于中间元素的右侧。如果中间元素是1,我们的答案可能是这个索引,或者如果当前中间元素之前有更多的1,则可能是当前中间元素左侧的索引。

Code:

代码:

include <bits/stdc++.h>

using namespace std;

using namespace std;

// function to find the first occurrence of 1 in the give sorted array

// 函数用于在给定的有序数组中查找1的第一次出现
int findIndex(int arr[], int low, int high)
int findIndex(int arr[], int low, int high)
{
while (low <= high) {
while (low <= high) {
int mid = low + (high - low) / 2;
int mid = low + (high - low) / 2;

// we check if the mid element is a 1 and the mid - 1 element is 0

// 我们检查中间元素是否为1且中间元素前一个元素是否为0
if (arr[mid] == 1 && (mid == 0 || arr[mid - 1] == 0))
if (arr[mid] == 1 && (mid == 0 || arr[mid - 1] == 0))
return mid;
返回 mid;

// our answer lies to the left of mid, we reduce our search space

// 我们的答案位于 mid 的左侧,我们缩小搜索空间
else if (arr[mid] == 1)
else if (arr[mid] == 1)
high = mid - 1;
high = mid - 1;

// our answer lies to the right of mid, we reduce our search space

// 我们的答案位于 mid 的右侧,我们缩小搜索空间
else
else
low = mid + 1;
low = mid + 1;
}

// we return -1 since 1 is not present in the array

// 我们返回 -1,因为数组中不存在 1
return -1;
return -1;
}

int main()

int main()
{
int arr[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
int arr[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
int n = sizeof(arr) / sizeof(arr[0]);
int n = sizeof(arr) / sizeof(arr[0]);
cout << findIndex(arr, 0, n - 1);
cout << findIndex(arr, 0, n - 1);
return 0;
return 0;
}
Output:
输出:

4
Explanation :

解释:

In the above code, we defined a function named ‘findIndex’ which finds the first occurrence of the first one in the sorted array. We reduce the search space by changing the values of low and high as per the current value of the middle element. If low exceeds high, we return -1 which indicates that no 1 is present in the array.

在上面的代码中,我们定义了一个名为 'findIndex' 的函数,它在排序数组中查找第一个 1 的首次出现。我们根据中间元素的当前值改变 low 和 high 的值,从而缩小搜索空间。如果 low 超过 high,我们返回 -1,表示数组中没有 1 存在。

8. What do you understand about an entry controlled loop in the context of OOPs programming?

在 OOPs 编程的上下文中,你对入口控制循环了解多少?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1a0 | 官方: 否 | 付费: 否

答案:

An entry control loop examines the condition at the point of entry and passes control to the body of the loop if the condition or expression becomes true.

入口控制循环在进入点检查条件,如果条件或表达式为真,则将控制传递给循环体。

The name "entry control loop" comes from the fact that this sort of loop regulates loop entry.

“入口控制循环”这个名称来源于这种循环控制循环入口的事实。

for loops and while loops are examples of entry controlled loops.

for 循环和 while 循环是入口控制循环的例子。

9. Differentiate between quick sort and merge sort in the context of sorting algorithms.

在排序算法的上下文中,区分快速排序和归并排序。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1a3 | 官方: 否 | 付费: 否

答案:

Following are the differences between quick sort and merge:

以下是快速排序和归并排序之间的区别:
Quick Sort
快速排序
Merge Sort
归并排序
In a quick sort, the array is divided into any ratio. In a quick sort, there is no requirement to divide the array of components into equal sections.
在快速排序中,数组以任意比例划分。在快速排序中,不需要将组成部分的数组划分为相等的部分。
The array is divided into only two halves (i.e. n/2) in the merge sort.
在归并排序中,数组仅被划分为两半(即 n/2)。
The worst-case complexity of quick sort is O(n2)
快速排序的最坏情况复杂度为 O(n2)
In merge sort, the worst and average cases have the same complexity O (n log n).
在归并排序中,最坏情况和平均情况具有相同的复杂度 O (n log n)。
The quick sort, on the other hand, does not function well with large datasets.
另一方面,快速排序在处理大型数据集时表现不佳。
Merge sorting can be used on any form of data set, regardless of its size (either large or small).
归并排序可用于任何形式的数据集,无论其大小(大或小)。
The quick sort is in place since it does not necessitate any extra storage.
快速排序是原地排序,因为它不需要任何额外存储。
Merge sort is not in place because it requires additional memory space to hold the auxiliary arrays.
归并排序不是原地排序,因为它需要额外的内存空间来保存辅助数组。
Quick sort is unstable (two elements with the same value may appear in a different order in the sorted array from that in the unsorted input array) in this situation. However, with a few code tweaks, it may be made stable.
在这种情况下,快速排序是不稳定的(具有相同值的两个元素在排序数组中的出现顺序可能与未排序输入数组中的顺序不同)。然而,通过一些代码调整,它可以变得稳定。
Merge sort is stable because two elements with the same value appear in the sorted output in the same order as they did in the unsorted input array.
归并排序是稳定的,因为具有相同值的两个元素在排序输出中的出现顺序与它们在未排序输入数组中的顺序相同。
Quick sort is preferred for arrays.
快速排序更适合数组。
Merge sort is preferred for linked lists.
归并排序更适合链表。
Quicksort has a good cache locality, making it faster than merge sort (in many cases like in a virtual memory environment).
快速排序具有良好的缓存局部性,使其比归并排序更快(在许多情况下,如在虚拟内存环境中)。
Merge sort has a poor locality of reference.
归并排序的引用局部性较差。

10. What do you understand about a deadlock in the context of operating systems? What are the necessary conditions for a deadlock?

在操作系统的上下文中,你对死锁了解多少?死锁的必要条件是什么?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1a6 | 官方: 否 | 付费: 否

答案:

A deadlock occurs when a group of processes is halted because each process is holding a resource and waiting for another process to obtain it.

当一组进程被停止时,就会发生死锁,因为每个进程都持有一个资源并等待另一个进程获取它。

Consider the situation when two trains are approaching each other on the same track and there is only one track: once they are in front of each other, neither train can move. In operating systems, a similar situation happens when two or more processes hold some resources while waiting on resources owned by other processes (s).

考虑这样一种情况:两列火车在同一条轨道上相向而行,且只有一条轨道:一旦它们面对面,两列火车都无法移动。在操作系统中,当两个或多个进程持有某些资源,同时等待其他进程拥有的资源时,就会发生类似的情况。

For example, let us assume that there are two trucks trying to cross a one-way bridge from opposite ends. None of the trucks is ready to move back and neither can any of them cross the bridge. In this situation, a deadlock has been obtained.

例如,让我们假设有两辆卡车试图从相反的两端穿过一座单向桥。没有一辆卡车准备后退,任何一辆都无法过桥。在这种情况下,就产生了死锁。

Following are the necessary conditions for a deadlock : - Mutual Exclusion: One or more resources are not available for sharing. That is, only one process can use the resource at a time.

以下是死锁的必要条件:- 互斥:一个或多个资源不可共享。也就是说,一次只有一个进程可以使用该资源。
  • Hold and Wait: A process is holding at least one resource and waiting for further resources.
  • No Preemption: A resource can only be obtained from a process if it is released by the process. There can be no forced snatching of the resources.
  • Circular Wait: A group of processes are waiting for each other in a circular fashion.

11. What do you understand about arrays? What are some of the real life applications of an array?

你对数组了解多少?数组的一些现实生活应用是什么?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1a9 | 官方: 否 | 付费: 否

答案:

A collection of items stored in contiguous memory spaces is referred to as an array. The objective is to group together goods of the same type. This makes calculating the position of each element easy by simply adding an offset to a base value, such as the memory address of the array's first element.

存储在连续内存空间中的一组项称为数组。目标是将相同类型的物品分组在一起。这使得计算每个元素的位置变得容易,只需将偏移量添加到基值,例如数组第一个元素的内存地址。

Following are the real-life applications of an array: - Arrays can be used to store data in a tabular style as a simple application. For example, if we want to save our contacts on our phones, the software will simply create an array with all of our contacts.

以下是数组的现实生活应用:- 数组可以用于以表格样式存储数据,作为一种简单的应用。例如,如果我们想在手机上保存联系人,软件将简单地创建一个包含我们所有联系人的数组。
  • The arrangement of a game's leaderboard may be done simply by using arrays to record the score and arranging them in descending order to clearly see each player's rank in the game.
  • A straightforward question paper consists of an array of numbered questions, each of which is assigned a set of marks.
  • In image processing, 2D arrays, often called matrices, are used.
  • It's also used in speech recognition, where each spoken signal is represented by an array.

12. Differentiate between variable/ function declaration and definition in the context of any OOPs programming language.

在任何面向对象编程语言的上下文中,区分变量/函数的声明与定义。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1ac | 官方: 否 | 付费: 否

答案:

The purpose of a variable declaration is to tell the compiler of the following information: the variable's name, the kind of value it stores, and the initial value if any. Declaration, in other words, provides information about a variable's attributes. The definition of a variable allocates memory space for the variable and specifies where the variable will be stored.

变量声明的目的是向编译器告知以下信息:变量的名称、它存储的值的类型,以及初始值(如果有的话)。换句话说,声明提供了关于变量属性的信息。变量的定义则为变量分配内存空间,并指定变量将被存储的位置。

The following table illustrates the differences between definition and declaration:

下表说明了定义与声明之间的区别:
Definition
定义
Declaration
声明
Only one time can a variable or function be defined.
一个变量或函数只能被定义一次。
There is no limit to how many times a variable or function can be declared.
一个变量或函数可以被声明的次数没有限制。
Memory is allocated during definition.
定义期间会分配内存。
Memory is not allocated during declaration.
声明期间不会分配内存。
Example: void fun() { cout << “Hello World” << “\n”; } The above code defines a void function named “fun” and the compiler allocates the memory for it as soon as it encounters the above code.
示例:void fun() { cout << “Hello World” << “\n”; } 上述代码定义了一个名为“fun”的void函数,编译器一旦遇到上述代码就会为其分配内存。
Example: void fun(); The above code declares a void function named “fun”.
示例:void fun(); 上述代码声明了一个名为“fun”的void函数。

13. Differentiate between struct and union in the context of C programming language.

在C编程语言的上下文中,区分struct和union。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1af | 官方: 否 | 付费: 否

答案:

  • struct: In C, a structure is a user-defined data type that allows you to combine data objects of various types. A record is represented by a structure.

Syntax:

语法:
struct structureName
struct structureName
{
member definition;
member definition;
member definition;
member definition;
...
member definition;
member definition;
};
  • union: In C, a union is a unique data type that allows you to store many data types in the same memory region. A union can have numerous members, but only one of them can have a value at any given time. Unions are a useful approach to reuse the same memory space for numerous purposes.

Syntax:

语法:
union unionName
union unionName
{
member definition;
member definition;
member definition;
member definition;
...
member definition;
member definition;
};
The following table illustrates the differences between struct and union:
下表说明了struct和union之间的区别:
structunion
A structure is defined using the struct keyword.
结构体使用 struct 关键字定义。
Union is defined by the keyword union.
联合体使用 union 关键字定义。
The compiler allocates memory to each variable member when the variables are declared in a structure. The total size of each data member determines the size of a structure.
在结构体中声明变量时,编译器会为每个变量成员分配内存。每个数据成员的总大小决定了结构体的大小。
When a variable is declared in a union, the compiler allocates memory to the variable member with the largest size. A union's size is determined by the size of its largest data member.
在联合体中声明变量时,编译器会为具有最大大小的变量成员分配内存。联合体的大小由其最大数据成员的大小决定。
Changing a variable's value has no effect on other variables present in the struct.
更改变量的值不会影响结构体中存在的其他变量。
Changing the value of one variable member will have an impact on the other variables present in the union.
更改一个变量成员的值会影响联合体中存在的其他变量。
Each variable's member has its own memory area.
每个变量的成员都有自己的内存区域。
Members of a variable share the memory space of the variable with the largest size.
变量的成员共享具有最大大小的变量的内存空间。
Multiple variables in a structure can be initialised at the same time.
结构体中的多个变量可以同时初始化。
Only the first data member of a union can be initialised.
只能初始化联合体的第一个数据成员。
At any point in the program, all variable members store some value.
在程序中的任何时刻,所有变量成员都存储某个值。
At any given point in the program, exactly one data member stores a value.
在程序中的任何给定时刻,恰好有一个数据成员存储值。
It's used to keep track of various data types' values.
它用于跟踪各种数据类型的值。
It's used to save one value at a time from a variety of data types.
它用于一次从多种数据类型中保存一个值。
It provides for the simultaneous access and retrieval of any data member.
它提供了对任何数据成员的同时访问和检索。
It lets you access and retrieves individual data members at a time.
它允许您一次访问和检索单个数据成员。

14. What do you know about the ACID properties of a transaction in the context of a database management system?

在数据库管理系统的上下文中,您对事务的 ACID 属性了解多少?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1b2 | 官方: 否 | 付费: 否

答案:

In a SQL Database, every transaction must follow some specific set of properties. These properties are referred to as ACID properties. They are as follows:

在 SQL 数据库中,每个事务都必须遵循一些特定的属性。这些属性称为 ACID 属性。它们如下所示:
  • A for Atomicity: This means that either the complete transaction occurs at once or it does not occur at all. There is no middle ground, which means that transactions do not take place in stages. Each transaction is treated as a single entity that is either completed or not conducted at all. It entails the following two procedures.

Abort: If a transaction aborts, any database modifications are lost.

中止:如果事务中止,任何数据库修改都将丢失。
Commit: When a transaction commits, the changes it contains become visible.The 'All or nothing rule' is another name for atomicity.For example, consider a bank transaction from one account to another. The transaction must either be completed entirely or must be failed. There cannot be a midway transaction such as money has been debited from one account but has not been credited to the other account. - C for Consistency: This property implies that integrity constraints must be fulfilled before and after the transaction to ensure that the database is consistent. It refers to a database's correctness. For example, if a bank transaction is performed from account A having X money to an account B having Y money, then after the transaction has been performed the total amount of money must remain the same, that is, X + Y.
提交:当事务提交时,它包含的更改变得可见。'全有或全无规则'是原子性的另一个名称。例如,考虑从一账户到另一账户的银行事务。事务必须完全完成或必须失败。不能存在中途事务,例如钱已从一个账户借记但尚未贷记到另一个账户。 - C 代表一致性:此属性意味着在事务之前和之后必须满足完整性约束,以确保数据库是一致的。它指的是数据库的正确性。例如,如果从拥有 X 金额的账户 A 到拥有 Y 金额的账户 B 执行银行事务,那么在事务执行后,总金额必须保持不变,即 X + Y。
  • I for Isolation: This attribute assures that several transactions can take place at the same time without causing database state inconsistencies. Transactions take place in a non-interfering manner. Changes made in one transaction are not visible to other transactions until that transaction's update is written to memory or committed. This feature assures that concurrently executing transactions results in a state that is identical to the one attained if they were executed sequentially in some order.For example, a bank has many ATMs present in a country. All of the ATMs can operate at the same time. They function as if they are the only transaction being performed on the bank’s database thereby, implementing isolation.
  • D for Durability: This attribute ensures that once a transaction has completed execution, the database updates and modifications are saved and written to memory and that they survive even if the system fails. These modifications are now saved in non-volatile memory and are permanent. As a result, the transaction's effects are never lost.For example, a backup database must be maintained so that if in any case, the primary database fails, we can recover the data from the backup database.

15. What is a DataBase Management System? What are its advantages over traditional file systems?

什么是数据库管理系统?与传统的文件系统相比,它有哪些优势?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1b5 | 官方: 否 | 付费: 否

答案:

A database management system is a piece of software that manages databases. Examples of database management systems include MySQL, Oracle, and other commercial databases. A database management system (DBMS) provides an interface for doing tasks such as building a database, saving data in it, updating data, and creating a table in the database, among others. It ensures the database's safety and security. It also ensures data consistency when there are multiple users.

数据库管理系统是管理数据库的软件。数据库管理系统的示例包括 MySQL、Oracle 和其他商业数据库。数据库管理系统 (DBMS) 提供了一个界面,用于执行诸如构建数据库、在其中保存数据、更新数据以及在数据库中创建表等任务。它确保数据库的安全性和安全性。当有多个用户时,它还确保数据一致性。

Following are the advantages of a database management system over traditional file systems : - Better Data Management: Database management makes it possible for users to access better-managed data. As a result, end-users will be able to take a quick check at their data and respond quickly to any changes.

以下是数据库管理系统相对于传统文件系统的优势: - 更好的数据管理:数据库管理使用户能够访问管理更好的数据。因此,最终用户将能够快速查看他们的数据并快速响应任何更改。
  • Enhanced Data Security: As the number of users grows, the rate at which data is transferred or shared grows as well, raising the danger of data security. It is frequently used in the corporate sphere, where organisations devote a significant amount of money, time, and effort to assure data security and proper use. A Database Management System (DBMS) helps firms improve data security by providing a better platform for data privacy and security regulations.
  • Reduced Data Inconsistency: In a database management system, data inconsistency is minimised when various versions of the same data appear in different places. For example, data inconsistency occurs when a student's name is saved as "William Shakespeare" on the school's main computer, while the same student's name is saved as "W. Shakespeare" on the teacher's registered system.
  • Faster data access: The database management system (DBMS) aids in the production of speedy responses to database queries, allowing for faster and more accurate data access. End users, for example, will have improved access to data while dealing with massive amounts of sales data, allowing for a speedier sales cycle.

16. What do you understand about processes and threads in the context of an operating system?

在操作系统的上下文中,您对进程和线程了解多少?
  • 知识点: 大型机与遗留系统 / 行为与软技能 (标签: interviewbit, ibm, company-specific)
  • 类型: behavioral | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1b8 | 官方: 否 | 付费: 否

答案:

  • Process: Any program in execution is referred to as a process. Any process is controlled by a process control block. Process priority, process id, process state, CPU, register, and other information are all stored in the Process Control Block (PCB). Child Processes are created when a process spawns another process. It takes longer for a process to end, and it is isolated, which means it doesn't share memory with other processes.
  • Thread: A thread is a section of a process, which means that a process can have several threads, all of which are contained within the process. A thread can be in one of three states: running, ready, or blocked. Threads require less time to terminate than processes, but they do not isolate like processes.

The following table illustrates the differences between them:

下表说明了它们之间的差异:
Process
进程
Thread
线程
The creation of a process takes more time.
创建进程需要更多时间。
The creation of a thread takes less time.
创建线程需要更少时间。
Switching between contexts from one process to another takes longer.
从一个进程到另一个进程的上下文切换需要更长时间。
Switching between contexts from one thread to another takes less time.
从一个线程到另一个线程的上下文切换需要更少时间。
In terms of intercommunication, the process is inefficient.
在相互通信方面,进程是低效的。
In terms of intercommunication, Thread is more efficient.
在相互通信方面,线程更高效。
Different processes use different areas of memory. They do not share memory.
不同的进程使用不同的内存区域。它们不共享内存。
Threads of the same process share memory.
同一进程的线程共享内存。
The Process Control Block, Stack, and Address Space are all unique to each process.
进程控制块、栈和地址空间都是每个进程独有的。
All threads of the same process share the process control block but have different thread control blocks, stack and address space.
同一进程的所有线程共享进程控制块,但具有不同的线程控制块、栈和地址空间。
When one process gets blocked, it does not affect the other running processes.
当一个进程被阻塞时,它不会影响其他正在运行的进程。
When one thread gets blocked, all the other threads of the same process get blocked.
当一个线程被阻塞时,同一进程的所有其他线程都会被阻塞。
The operating system interface is used for process switching.
操作系统接口用于进程切换。
Thread switching does not necessitate invoking an operating system or causing a kernel interrupt.
线程切换不需要调用操作系统或引起内核中断。

17. Differentiate between primary memory and secondary memory in the context of a computer.

在计算机的上下文中,区分主存储器和辅助存储器。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1bb | 官方: 否 | 付费: 否

答案:

  • Primary/Main Memory: The computer memory that is directly accessible by the CPU is referred to as primary memory. It is made up of DRAM (Dynamic Random Access Memory) and provides the processor with an actual working area. It keeps track of the data and instructions that the processor is currently processing. Example - RAM (Random Access Memory)
  • Secondary Memory: Because the processor does not directly interface with the secondary memory, the contents of the secondary memory are first transferred to the primary memory and then accessed by the processor. Example - Hard disk, USB drive, etc.

The following table illustrates the differences between primary memory and secondary memory:

下表说明了主存储器和辅助存储器之间的差异:
Primary Memory
主存储器
Secondary Memory
辅助存储器
Storage in primary memory is temporary.
主存储器中的存储是临时的。
Storage in secondary memory is permanent.
辅助存储器中的存储是永久的。
Processor/CPU has immediate access to primary memory.
处理器/CPU 可以立即访问主存储器。
Processor/CPU does not have immediate access to primary memory.
处理器/CPU 不能立即访问主存储器。
It may be volatile (requires power to maintain the stored information) or non-volatile in nature.
它可能是易失性的(需要电源来维持存储的信息)或非易失性的。
It is always non-volatile (does not require power to maintain the stored information) in nature.
它始终是非易失性的(不需要电源来维持存储的信息)。
Semiconductor memories are the memory devices utilised for primary memory.
半导体存储器是用于主存储器的存储设备。
Magnetic and optical memories are used as secondary memory devices.
磁存储器和光存储器用作辅助存储设备。
Primary memory is more expensive than secondary memory.
主存储器比辅助存储器更昂贵。
When compared to primary memory devices, secondary memory devices are less expensive.
与主存储设备相比,辅助存储设备更便宜。

18. What are the functions of an operating system?

操作系统的功能是什么?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1be | 官方: 否 | 付费: 否

答案:

Following are the functions of an operating system : - Provides user interface: Operating systems provide an interface between computer hardware and the users. It makes it easy for the user to access the hardware in a systematic manner.

以下是操作系统的功能: - 提供用户界面:操作系统提供计算机硬件和用户之间的界面。它使用户能够以系统化的方式轻松访问硬件。
  • Maintains system performance: Helps increase performance by monitoring overall system health. To get a thorough picture of the system's health, keep track of the time between service requests and system responses. This can aid performance by providing critical information for troubleshooting issues.
  • Security: To safeguard user data, the operating system employs password protection and other similar measures. It also protects applications and user data from illegal access.
  • Error-detection: The operating system constantly monitors the system in order to detect errors and prevent a computer system from failing.
  • Memory Management: The primary memory, often known as main memory, is managed by the operating system. The main memory consists of a vast array of bytes or words, each of which is allocated an address. Main memory is rapid storage that the CPU can access directly. A program must first be loaded into the main memory before it can be executed. For memory management, an operating system performs the following tasks:
    It keeps track of primary memory, i.e., which user programmes use specific bytes of memory. Memory addresses that have already been assigned, as well as memory addresses that have yet to be used. The OS determines the order in which processes are permitted memory access and for how long in multiprogramming. It allocates memory to a process when the process asks for it and deallocates memory when the process exits or performs an I/O activity. - Processor Management: In a multiprogramming environment, the operating system determines the sequence in which tasks access the processor and the amount of processing time each process has.

    它跟踪主存储器,即哪些用户程序使用特定的内存字节。已分配的内存地址,以及尚未使用的内存地址。在多道程序设计环境中,操作系统决定进程被允许访问内存的顺序以及访问的时长。当进程请求内存时,它为该进程分配内存,并在进程退出或执行 I/O 活动时释放内存。 - 处理器管理:在多道程序设计环境中,操作系统决定任务访问处理器的顺序以及每个进程的处理时间。
  • Device Management: An operating system (OS) controls device connectivity through drivers. It keeps track of all the devices that are linked to the system. The Input/Output controller is a program that is responsible for all devices. Determines which processes are allowed access to a device and for how long. Allocates devices in a way that is both effective and efficient. When a gadget is no longer needed, it is deallocated.
  • File Management: A file system is divided into directories to make navigation and usage more efficient. Other directories and files may be found in these directories. The operating system keeps track of where data is kept, user access settings, and the state of each file, among other things.

19. Explain function overloading and function overriding in the context of C++ programming language. Differentiate between them.

解释 C++ 编程语言中函数重载和函数覆盖的概念。区分它们之间的差异。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1c1 | 官方: 否 | 付费: 否

答案:

  • Function Overloading:

It allows for multiple definitions of the function by modifying the signature, i.e. the number of parameters, the datatype of the parameters, and the return type.

它通过修改签名(即参数的数量、参数的数据类型和返回类型)来允许对函数进行多个定义。
For example:
例如:

using namespace std;

using namespace std;

// Method 1

// 方法 1
void overloadedMethod(int x)
void overloadedMethod(int x)
{
cout << "In Overloaded Method 1" << endl;
cout << "In Overloaded Method 1" << endl;
}

// Method 2

// 方法 2
void overloadedMethod(float x)
void overloadedMethod(float x)
{
cout << "In Overloaded Method 2" << endl;
cout << "In Overloaded Method 2" << endl;
}

// Method 3

// 方法 3
void overloadedMethod(int x1, float x2)
void overloadedMethod(int x1, float x2)
{
cout << "In Overloaded Method 2" << endl;
cout << "In Overloaded Method 2" << endl;
}

int main()

int main()
{
int x = 5;
int x = 5;
float y = 5.5;
float y = 5.5;
overloadedMethod(x);
overloadedMethod(x);
overloadedMethod(y);
overloadedMethod(y);
overloadedMethod(x, y);
overloadedMethod(x, y);

return 0;

return 0;
}
Output:
输出:

In Overloaded Method 1

在重载方法 1 中
In Overloaded Method 2
在重载方法 2 中
In Overloaded Method 3
在重载方法 3 中
Explanation:
说明:

In the above code, we have three functions with the same name and return type. However, they have different function signatures which differentiates them from each other. When we pass a parameter of int type, method 1 gets executed. When we pass a parameter of float type, method 2 gets executed. When we pass both an int and a float type parameter, method 3 gets executed. - Function Overriding:

在上面的代码中,我们有三个名称和返回类型相同的函数。但是,它们具有不同的函数签名,从而彼此区分开来。当我们传递一个 int 类型的参数时,方法 1 被执行。当我们传递一个 float 类型的参数时,方法 2 被执行。当我们同时传递一个 int 和一个 float 类型的参数时,方法 3 被执行。 - 函数重写:
It is the redefining of a base class function in a derived class with the same signature, that is, the return type and parameters. It's only possible in derived classes.
它是在派生类中重新定义基类中具有相同签名(即返回类型和参数)的函数。这仅在派生类中可行。

class Test

class Test
{
public:
public:
virtual void print(){ cout << "Test Function"; }
virtual void print(){ cout << "Test Function"; }
};

class Sample : public Test

class Sample : public Test
{
public:
public:
void print(){ cout << "In Sample Function";}
void print(){ cout << "In Sample Function";}
};
int main()
int main()
{
Test obj = new Sample();
Test obj = new Sample();
obj.print();
obj.print();
return 0;
return 0;
}
Output:
输出:

In Sample Function

In Sample Function
In the above code, the class Sample extends the class Test and therefore inherits all its properties. We can clearly see that both the classes have a function ‘print’ with the same function signature and return type. Therefore, the above code implements function overriding. Since we have added a virtual keyword in the function of the base class, the function is called according to the type of object being referred to and so the print function of the Sample class gets called.
在上面的代码中,类 Sample 继承了类 Test,因此继承了它的所有属性。我们可以清楚地看到,这两个类都有一个函数 'print',具有相同的函数签名和返回类型。因此,上述代码实现了函数重写。由于我们在基类的函数中添加了 virtual 关键字,函数会根据所引用对象的类型被调用,因此 Sample 类的 print 函数被调用。

The following points illustrate the differences between function overloading and function overriding:

以下几点说明了函数重载和函数重写之间的区别:
  • When one class inherits from another, it causes overriding of functions. Overloading can happen in the same class.
  • Overloaded functions must have a different function signature, which means they must have a different number of parameters or a different type of parameter. Function signatures must be identical when overriding.
  • Overloaded functions are present in the same scope of a class while overridden functions are present in different scopes.

20. Explain the major concepts of Object Oriented Programming in the context of C++ programming language.

在 C++ 编程语言的背景下解释面向对象编程的主要概念。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1c4 | 官方: 否 | 付费: 否

答案:

There are four major concepts in Object-Oriented Programming. They are as follows:

面向对象编程有四个主要概念。它们如下:
  • Encapsulation: Encapsulation is described as the binding of data and the functions that alter it in Object-Oriented Programming. Encapsulation makes a class's variables or data concealed from other classes and that they can only be accessible through member functions of the class in which it is stated.Let us consider the following example: In a company, there are different divisions such as accounts, finance, sales, and so on. The finance department’s duty is to keep track of all financial data and the transactions performed on them. Similarly, the sales department’s duty is to keep track of all sales-related activities. Let us assume that an official from the finance department requires the sales data for a specific month. In this scenario, he cannot access the sales section's data directly. An official from the sales department must be contacted because only he can access the data. Here, the process of asking the sales officials for the data depicts encapsulation. The sales department's data and the people who can influence it are bundled together under the category "sales section."
  • Abstraction: Abstraction refers to revealing only the most important information while concealing the details. Data abstraction refers to exposing only the most important aspects of the data to the outside world while concealing the implementation specifics.Consider the case of a man driving a vehicle. The man only knows that pressing the accelerators will increase the vehicle's speed and that applying the brakes will stop it, but he has no idea how the speed is increased by pressing the accelerators, nor does he understand the car's inner mechanism or how the accelerator, brakes, and other controls are implemented in the car. This is the definition of abstraction.
  • Inheritance: Inheritance refers to a class's capacity to derive features and traits from another class. One of the most significant characteristics of Object-Oriented Programming is inheritance. A class that inherits properties from another class is referred to as a subclass or a derived class. A class whose properties and member functions are inherited by other classes are referred to as superclass or base class. Inheritance supports the concept of "reusability".Consider a class Vehicle that contains all the essential functions which a vehicle must possess. This includes accelerating speed, applying brakes, changing gear and so on.Now let us assume the classes Car, Bus, Truck and so on. All of these classes can be considered as a subclass of the class Vehicle since all of them must essentially possess all the properties of the class Vehicle.
  • Polymorphism: Polymorphism refers to the fact that something exists in multiple forms. Polymorphism, in simple terms, is the ability of a message to be displayed in multiple formats. For example, at the same time, a person might have a variety of characteristics. At the same time, he is a father, a spouse, and a worker. As a result, the same person behaves differently in different settings. Polymorphism is the term for this.There are mainly two types of polymorphism in C++. They are as follows:

Compile Time Polymorphism: Function overloading and operator overloading is used to achieve this form of polymorphism.

编译时多态:函数重载和运算符重载用于实现这种形式的多态。
Runtime Polymorphism: Function Overriding is used to generate this form of polymorphism.
运行时多态:函数重写用于生成这种形式的多态。

IBM Interview Preparation

21. Why are you a fit for this role?

为什么你适合这个职位?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1e7 | 官方: 否 | 付费: 否

答案:

In such types of questions, mention your strong points and the skills you possess which makes you a good fit for the role. A sample answer to the question could be as follows:

在这类问题中,提及你的强项和你所具备的技能,这些使你成为该职位的合适人选。该问题的一个示例答案可以如下:

“For various reasons, I am certain that I am a suitable fit for this role, but most notably because of my commitment to going above and beyond in my work. To succeed in this role, I am committed to learning any new abilities on my own. My abilities and skills are a perfect match for the prerequisites for this post. My communication and leadership abilities, in particular, make me a strong contender for the position.”

“出于各种原因,我确信自己是这个职位的合适人选,但最显著的原因是我在工作中追求卓越的承诺。为了在这个职位上取得成功,我致力于自学任何新技能。我的能力和技能完全符合这个岗位的先决条件。尤其是我的沟通和领导能力,使我成为这个职位的有力竞争者。”

22. Is it hard to get an internship at IBM?

在IBM获得实习机会难吗?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1ea | 官方: 否 | 付费: 否

答案:

IBM assesses a candidate thoroughly in both technical and interpersonal domains before making any hiring decisions. Therefore, getting an internship at IBM should not be considered as a piece of cake. However, with the right preparation and the right attitude, one can easily crack an internship at IBM. The only thing required is the right path and guidance.

IBM在做出任何招聘决定之前,都会对候选人在技术和人际交往两个方面进行全面评估。因此,在IBM获得实习机会不应被视为轻而易举的事。然而,有了正确的准备和正确的态度,一个人可以轻松攻克IBM的实习。唯一需要的就是正确的路径和指导。

23. Does IBM hire interns?

IBM招聘实习生吗?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1ed | 官方: 否 | 付费: 否

答案:

Yes, IBM does hire interns.

是的,IBM确实招聘实习生。

24. What is the salary for freshers at IBM?

IBM应届生的薪资是多少?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1f0 | 官方: 否 | 付费: 否

答案:

The average salary for freshers at IBM ranges from Rs. 2.2 lakhs per year to Rs. 7.3 lakhs per year.

IBM应届生的平均薪资范围为每年22万卢比到每年73万卢比。

25. Why do you want to work for IBM?

你为什么想为IBM工作?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1f3 | 官方: 否 | 付费: 否

答案:

In such types of questions, mention the things which motivate you to work for the company. Try to highlight the values and the motto which the company believes in as part of your motivation to join the company.

在这类问题中,提及激励你为公司工作的事项。试着强调公司所信奉的价值观和宗旨,作为你加入公司的动机的一部分。

The following could be a sample answer:

以下可以作为一个示例回答:

“I'd like to work with IBM because IBM has a strong set of principles and a clear commitment to not only your staff but also to your customers and clients. This is an organisation where I will be able to grow, thrive, and develop over time, and I will have the opportunity to work with an incredibly brilliant group of people who are all dedicated to the IBM brand's long-term success. I see this as a once-in-a-lifetime opportunity to put my abilities and traits to good use.”

“我想为IBM工作,因为IBM有一套强大的原则,并且不仅对员工,还对客户和顾客有着明确的承诺。这是一个我能随时间成长、茁壮发展和进步的组织,我将有机会与一群极其出色的人共事,他们都致力于IBM品牌的长期成功。我认为这是一个千载难逢的机会,让我的能力和特质得到充分发挥。”

26. Is IBM interview easy?

IBM的面试容易吗?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1f9 | 官方: 否 | 付费: 否

答案:

The interviews at IBM focus on the candidate’s understanding of the basic fundamentals. With the right preparation, IBM interviews are definitely easy to crack.

IBM的面试侧重于候选人对基础知识的理解。有了正确的准备,IBM的面试绝对容易攻克。

27. How long is the IBM hiring process?

IBM的招聘流程有多长?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf209 | 官方: 否 | 付费: 否

答案:

At International Business Machines, the employment procedure can take anywhere from two weeks to ten months . Because of the large number of applicants, the screening procedure takes a bit longer before the best candidates are chosen.

在International Business Machines,招聘流程可能需要两周到十个月不等。由于申请人数众多,筛选过程会稍长一些,之后才会选出最佳候选人。

Coding Problems

0/4

Easy Problems

简单问题

Time Complexity

时间复杂度

Graph Data Structure & Algorithms

图数据结构与算法

Arrays

数组

Strings

字符串

Pangram Check

全字母句检查

Very Easy

非常简单

28.56 Mins

28.56分钟

Solve

解答

Connected Components

连通分量

Easy

简单

32.11 Mins

32.11 分钟

Solve

解答

Diagonal Flip

对角线翻转

Very Easy

非常简单

21.15 Mins

21.15分钟

Solve

解答

Valid Password

有效密码

Very Easy

非常简单

21.45 Mins

21.45 分钟

Solve

解答

0/2

Intermediate Problems

中级问题

Dynamic Programming

动态规划

Word Break

单词拆分

Medium

中等

68.35 Mins

68.35 分钟

Solve

解答

Word Break II

单词拆分 II

Medium

中等

69.20 Mins

69.20 分钟

Solve

解答
0

评论

博主关闭了当前页面的评论
EN