Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Let G be an undirected complete graph on n vertices, where n > 2. Then, the number of different Hamiltonian cycles in G is equal to(A) n!(B) n – 1!(C) 1(D) (n-1)! / 2

Answer» None
2.

Consider the following two statements about database transaction schedules:I. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable.II. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can generate view serializable schedules that are not conflict serializable.Which of the above statements is/are TRUE?(A) I only(B) II only(C) Both I and II(D) Neither I nor II

Answer»
3.

Let G be an arbitrary group. Consider the following relations on G:R1: ∀a, b ∈ G, aR1b if and only if ∃g ∈ G such that a = g−1bgR2: ∀a, b ∈ G, aR2b if and only if a = b−1Which of the above is/are equivalence relation/relations?(A) R1 and R2(B) R1 only(C) R2 only(D) Neither R1 nor R2

Answer» None
4.

Consider the following C program:#include <stdio.h>int main() {float sum = 0.0, j = 1.0, i = 2.0;while (i / j > 0.0625) {j = j + j;printf("%f\n", sum);};return 0;}The number of times variable sum will be printed When the above program is executed is _________ .Note: This was Numerical Type question.(A) 5(B) 6(C) 4(D) 0

Answer» None
5.

Consider the following C program:#include<stdio.h>int main() {int a[] = {2, 4, 6, 8, 10};int i, sum = 0, *b = a + 4;for (i = 0; i < 5; i++ )sum = sum + (*b - i) - *(b - i);printf("%d\n", sum);return 0;}The output of above C program is __________ .Note: This was Numerical Type question.(A) 10(B) 8(C) 6(D) 3

Answer» None
6.

If L is a regular language over ∑ = {a, b}, which one of the following languages is NOT regular?(A) L⋅ LR {xy ⏐ x ∈ L, yR∈ L}(B) Suffix (L) = {y ∈ ∑* ⏐ ∃x ∈ ∑* such that xy ∈ L}(C) Prefix (L) = {x ∈ ∑* ⏐ ∃y ∈ ∑* such that xy ∈ L}(D) {wwR ⏐ w ∈ L}

Answer»
7.

A relational database contains two tables Student and Performance as shown below:The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together from the primary key. Consider the SQL query given below:SELECT S.Student_name, sum(P.Marks)FROM Student S, Performance PWHERE P.Marks > 84GROUP BY S.Student_name;The number of rows returned by the above SQL query is _________ .Note: This was Numerical Type question.(A) 5(B) 4(C) 3(D) None of these.

Answer»
8.

Consider a sequence of 14 elements: A = [-5, -10, 6, 3, -1, -2, 13, 4, -9, -1, 4, 12, -3, 0]. The subsequence sum . Determine the maximum of S(i,j), where 0 ≤ i ≤ j < 14. (Divide and conquer approach may be used)Note: This was Numerical Type question.(A) 29(B) 19(C) 39(D) 09

Answer» None
9.

Consider the following C program:void convert(int n) {if (n < 0)printf(“ % d”, n);else {convert(n / 2);printf(“ % d”, n % 2);}}Which one of the following will happen when the function convert is called with any positive integer n as argument?(A) It will print the binary representation of n in the reverse order and terminate.(B) It will print the binary representation of n but will not terminate(C) It will not print anything and will not terminate.(D) It will print the binary representation of n and terminate.

Answer» None
10.

Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this?(A) X sends an ARP request packet with broadcast IP address in its local subnet(B) X sends an ARP request packet to the local gateway’s MAC address which then finds the MAC address of Y and sends to X(C) X sends an ARP request packet with broadcast MAC address in its local subnet(D) X sends an ARP request packet to the local gateway’s IP address which then finds the MAC address of Y and sends to X

Answer»
11.

Consider three machines M, N and P with IP addresses 100.10.5.2, 100.10.5.5 and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true?(A) M, N and P all belong to the same subnet(B) Only N and P belong to the same subnet(C) M, N, and P belong to three different subnets(D) Only M and N belong to the same subnet

Answer» None
12.

Consider the following C program:#include<stdio.h>int r(){int static num=7;return num--;}int main() {for(r();r();r()) {printf("%d ",r());};return 0;}Which one of the following values will be displayed on execution of the programs?(A) 41(B) 52(C) 63(D) 630

Answer» None
13.

Let X be a square matrix. Consider the following two statements on X.I. X is invertibleII. Determinant of X is non-zero Which one of the following is TRUE?(A) I implies II; II does not imply I(B) II implies I; I does not imply II(C) I does not imply II; II does not imply I(D) I and II are equivalent statements

Answer»
14.

The following C program is executed on a Unix / Linux system:#include <unistd.h>int main() {int i;for (i = 0; i < 10; i++)if (i % 2 == 0) fork();return 0;}The total number of child process created is __________ .Note – This was Numerical Type question.(A) 31(B) 63(C) 5(D) 6

Answer» None
15.

Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100.The process are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y–X is __________.Note: This was Numerical Type question.(A) 80(B) 130(C) 50(D) None of these

Answer» None
16.

Consider the following C program:#include <stdio.h>int jumble(int x, int y) {x = 2 * x + y;return x;}int main() {int x = 2, y = 5;y = jumble(y, x);x = jumble(y, x);printf("%d\n", x);return 0;}The value printed by program is __________ .Note: This was Numerical Type question.(A) 26(B) 2(C) 5(D) 12

Answer» None
17.

Consider the following given grammar:S → AaA → BDB → b|εD → d|ε Let a, b, d and $ be indexed as follows:Compute the FOLLOW set of the non-terminal B and write the index values for the symbols in the FOLLOW set in the descending order. (For example, if the FOLLOW set is {a, b, d, $}, then the answer should be 3210).Note: This was Numerical Type question.(A) 31(B) 310(C) 230(D) 23

Answer» None
18.

Two numbers are chosen independently and uniformly at random from the set {1, 2, …, 13}. The probability (rounded off to 3 decimal places) that their 4-bit (unsigned) binary representations have the same most significant bit is ___________.Note: This was Numerical Type question.(A) 0.5029(B) 0.538(C) 0.461(D) 0.248

Answer» None
19.

An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is _________.Note: This was Numerical Type question.(A) 0.08(B) 0.0016(C) 0.04(D) 0.0008

Answer» None
20.

For Σ = {a, b}, let us consider the regular languageL = {x ∣ x = a2 + 3k or x = b10 + 12k, k ≥ 0} Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for L?(A) 3(B) 5(C) 9(D) 24

Answer»
21.

The value of 351 mod 5 is _________ .Note: This was Numerical Type question.(A) 1(B) 2(C) 3(D) 4

Answer» None
22.

Consider the following C program:#include<stdio.h>int main(){int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip = arr + 4;printf("%d\n", ip[1]);return 0;}The number that will be displayed on execution of the program is _________ .(A) 6(B) 5(C) 4(D) segmentation error

Answer» None
23.

Consider Z = X − Y where X, Y and Z are all in sign-magnitude form. X and Y are each represented in n bits. To avoid overflow, the representation of Z would require a minimum of:(A) n bits(B) n−1 bits(C) n+1 bits(D) n+2 bits

Answer» None
24.

In 16-bit 2’s complement representation, the decimal number −28 is:(A) 1111 1111 0001 1100(B) 0000 0000 1110 0100(C) 1111 1111 1110 0100(D) 1000 0000 1110 0100

Answer» None
25.

Which one of the following languages over ∑ = {a, b} is NOT context-free?(A) {anbi ⏐ i ∈ {n, 3n, 5n}, n≥ 0}(B) {wanwRbn ⏐ w ∈ {a, b}*, n≥ 0}(C) {wwR ⏐ w ∈ {a, b}*}(D) {wan bn wR ⏐ w ∈ {a, b}*, n≥ 0}

Answer» None
26.

In a college, there are three student clubs, Sixty students are only in the Drama club, 80 students are only in the Dance club, 30 students are only in Maths club, 40 students are in both Drama and Dance clubs, 12 students are in both Dance and Maths clubs, 7 students are in both Drama and Maths clubs, and 2 students are in all clubs. If 75% of the students in the college are not in any of these clubs, then the total number of students in the college is _____________.(A) 1000(B) 975(C) 900(D) 225

Answer» None
27.

Three of the five students are allocated to a hostel put in special requests to the warden, Given the floor plan of the vacant rooms, select the allocation plan that will accommodate all their requests.Request by X: Due to pollen allergy, I want to avoid a wing next to the garden.Request by Y: I want to live as far from the washrooms as possible since I am very much sensitive to smell.Request by Z: I believe in Vaastu and so I want to stay in South-West wing.The shaded rooms are already occupied. WR is washroom(A)(B)(C)(D)

Answer»